Skip to content

Running grate on a postgres database which had previously been migrated using roundhouse does not work. #3 #597

@cocytus

Description

@cocytus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requestedtriageWork out what the issue is

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions