Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
briskt opened this issue Feb 10, 2020 · 1 comment
Open

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

briskt opened this issue Feb 10, 2020 · 1 comment
Labels
enhancement New feature or request s: triage
Milestone

Comments

@briskt
Copy link

briskt commented Feb 10, 2020

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.

@briskt briskt changed the title change_column doesn't support {"null": true} change_column doesn't support {"default": null} Feb 10, 2020
@sio4
Copy link
Member

sio4 commented Sep 7, 2022

DROP DEFAULT is not currently supported.

@sio4 sio4 added enhancement New feature or request s: triage labels Sep 7, 2022
@sio4 sio4 added this to the v2 milestone Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request s: triage
Projects
None yet
Development

No branches or pull requests

2 participants