fizz
fizz copied to clipboard
change_column doesn't support {"default": null}
I need to change a column in a PostgresQL database from kilograms numeric(13,4) DEFAULT '0'::numeric NOT NULL TO kilograms numeric(13,4)
To do this, I created a fizz migration containing
change_column("posts", "kilograms", "numeric(13,4)", {"default": null,"null": true})
but it fails with
error processing migrations/20200210151102_post_kilograms_nullable.up.fizz: could not fizz the migration migrations/20200210151102_post_kilograms_nullable.up.fizz: line 0: "null": unknown identifier
If I leave off the "default": null the previous default remains, which is not what I want. I also tried "default": "null" but that didn't work either.
DROP DEFAULT is not currently supported.