Skip to content

change_column doesn't support {"default": null} #75

@briskt

Description

@briskt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions