on main help sign in
Fix issue where `changes` had to be set for `alter_column`
35a52ebfabianlindfors
src/migrations/alter_column.rs+2−1
@@ -13,10 +13,11 @@ pub struct AlterColumn {
13 pub column: String,
13 pub column: String,
14 pub up: Option<String>,
14 pub up: Option<String>,
15 pub down: Option<String>,
15 pub down: Option<String>,
16+ #[serde(default)]
16 pub changes: ColumnChanges,
17 pub changes: ColumnChanges,
17}
18}
18
19
19−#[derive(Serialize, Deserialize, Debug)]
20+#[derive(Serialize, Deserialize, Default, Debug)]
20pub struct ColumnChanges {
21pub struct ColumnChanges {
21 pub name: Option<String>,
22 pub name: Option<String>,
22 #[serde(rename = "type")]
23 #[serde(rename = "type")]