Fix issue where changes had to be set for alter_column

Some type of changes don't require anything in `changes`, for example
when changing the values of a column with `up` and `down`.
This commit is contained in:
fabianlindfors 2022-01-15 15:53:55 +01:00
parent a7d70f80b8
commit 35a52ebd81

View File

@ -13,10 +13,11 @@ pub struct AlterColumn {
pub column: String,
pub up: Option<String>,
pub down: Option<String>,
#[serde(default)]
pub changes: ColumnChanges,
}
#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Default, Debug)]
pub struct ColumnChanges {
pub name: Option<String>,
#[serde(rename = "type")]