Open cocytus opened 1 week ago
Reproducing bug:
Run RH on Postgres DB (on Windows). Works. Tables created.
Run Grate on same DB using correct --schema. Grate renames/recreates the scriptsrun table to ScriptsRun. No errors because of no schema changes.
Create a new sql script for grate to run in up folder. Error:
Update ("up"): -------------------------------------------------------------------------------- 0053_TheScript.sql: 23505: duplicate key value violates unique constraint "roundhouse_scriptsrun_pk" (0,0): UPDATE "MyTable" ^ 23505: duplicate key value violates unique constraint "roundhouse_scriptsrun_pk" Exception: Database migration (Update) failed!, exiting.. 1
Reason: ScriptsRun id column has SELECT nextval('roundhouse.scriptsrun_id_seq'::regclass) default value. This value is not set to the correct MAX(id)+1 after the RH->Grate migration.
Reproducing bug:
Run RH on Postgres DB (on Windows). Works. Tables created.
Run Grate on same DB using correct --schema. Grate renames/recreates the scriptsrun table to ScriptsRun. No errors because of no schema changes.
Create a new sql script for grate to run in up folder. Error:
Reason: ScriptsRun id column has SELECT nextval('roundhouse.scriptsrun_id_seq'::regclass) default value. This value is not set to the correct MAX(id)+1 after the RH->Grate migration.