mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-20 11:21:17 +00:00
d8722b6e91
* Adding diesel enums for SortType and ListingType - Uses diesel-derive-enum. - Adds diesel.toml , so we can again use the auto-generated schema.rs - Fixes a lot of DB null issues and column ordering issues. - Fixes #1136 - Also replaces RegistrationMode boilerplate. * Fixing unit tests 1. * Remove comment line. * Before patch. * Before again. * Using patch file to fix diesel_ltree issue with diesel.toml * Adding some yalc ignores * Fixing RegistrationMode enums * Adding woodpecker diesel schema check. * Try adding openssl 1. * Try using diesel-cli image 1 * Try using diesel-cli image 2 * Try using diesel-cli image 3 * Try using diesel-cli image 4 * Try using diesel-cli image 5 * Try using diesel-cli image 6 * Try using diesel-cli image 7 * Try using diesel-cli image 8 * Try using diesel-cli image 9 * Try using diesel-cli image 10 * Try using diesel-cli image 11 * Try using diesel-cli image 12 * Try using diesel-cli image 13
36 lines
1 KiB
Diff
36 lines
1 KiB
Diff
diff --git a/crates/db_schema/src/schema.rs b/crates/db_schema/src/schema.rs
|
|
index 255c6422..f2ccf5e2 100644
|
|
--- a/crates/db_schema/src/schema.rs
|
|
+++ b/crates/db_schema/src/schema.rs
|
|
@@ -2,16 +2,12 @@
|
|
|
|
pub mod sql_types {
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
#[diesel(postgres_type(name = "listing_type_enum"))]
|
|
pub struct ListingTypeEnum;
|
|
|
|
- #[derive(diesel::sql_types::SqlType)]
|
|
- #[diesel(postgres_type(name = "ltree"))]
|
|
- pub struct Ltree;
|
|
-
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
#[diesel(postgres_type(name = "registration_mode_enum"))]
|
|
pub struct RegistrationModeEnum;
|
|
|
|
#[derive(diesel::sql_types::SqlType)]
|
|
#[diesel(postgres_type(name = "sort_type_enum"))]
|
|
@@ -67,13 +63,13 @@ diesel::table! {
|
|
when_ -> Timestamp,
|
|
}
|
|
}
|
|
|
|
diesel::table! {
|
|
use diesel::sql_types::*;
|
|
- use super::sql_types::Ltree;
|
|
+ use diesel_ltree::sql_types::Ltree;
|
|
|
|
comment (id) {
|
|
id -> Int4,
|
|
creator_id -> Int4,
|
|
post_id -> Int4,
|
|
content -> Text,
|