Attempting to change a PostgreSQL column from NULL to NOT NULL. Added the following fizz command to a new migration:
change_column("posts", "destination_id", "integer", {null: false})
Running pop migrate -d produces:
sql - ALTER TABLE "posts" ALTER COLUMN "destination_id" TYPE integer, ALTER COLUMN "destination_id" DROP NOT NULL;```
instead of:
sql - ALTER TABLE "posts" ALTER COLUMN "destination_id" TYPE integer, ALTER COLUMN "destination_id" SET NOT NULL;
Workaround (empty options) is easy, but it seems this should work too.
Attempting to change a PostgreSQL column from NULL to NOT NULL. Added the following fizz command to a new migration:
Running
pop migrate -dproduces:instead of:
Workaround (empty options) is easy, but it seems this should work too.