diff --git a/src/schemas/entities.rs b/src/schemas/entities.rs index 2628bc4..cd14be2 100644 --- a/src/schemas/entities.rs +++ b/src/schemas/entities.rs @@ -4,7 +4,9 @@ use crate::mappings::SQLiteDatatypes; #[derive(Debug, Deserialize, Serialize, Default, Clone)] pub struct Table { pub name: String, + #[serde(default)] pub columns: Vec, + #[serde(default)] pub strict: bool } @@ -12,11 +14,17 @@ pub struct Table { pub struct Column { pub name: String, pub datatype: SQLiteDatatypes, + #[serde(default)] pub nullable: bool, + #[serde(default)] pub default: Option, + #[serde(default)] pub auto_increment: bool, + #[serde(default)] pub unique: bool, + #[serde(default)] pub check_constraint: Option, // raw check constraint + #[serde(default)] pub primary_key: bool }