-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
c/consoleRelated to consoleRelated to consolee/quickfixcan be wrapped up in few hourscan be wrapped up in few hoursk/bugSomething isn't workingSomething isn't working
Description
Steps to reproduce:
- Crate table.
- Set default for a column.
Generated migrations will be okay at this point:
up
- args:
cascade: false
read_only: false
sql: ALTER TABLE ONLY "public"."user" ALTER COLUMN "info" SET DEFAULT 'some info';
type: run_sql
down
- args:
cascade: false
read_only: false
sql: ALTER TABLE ONLY "public"."user" ALTER COLUMN "info" DROP DEFAULT;
type: run_sql
- Change the default value.
Up migration will be correct:
- args:
cascade: false
read_only: false
sql: ALTER TABLE ONLY "public"."user" ALTER COLUMN "info" SET DEFAULT 'new info';
type: run_sql
But the down migration would have the incorrect syntax (''some info'::text' part):
- args:
cascade: false
read_only: false
sql: ALTER TABLE ONLY "public"."user" ALTER COLUMN "info" SET DEFAULT ''some info'::text';
type: run_sql
Metadata
Metadata
Assignees
Labels
c/consoleRelated to consoleRelated to consolee/quickfixcan be wrapped up in few hourscan be wrapped up in few hoursk/bugSomething isn't workingSomething isn't working