You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Primary key or a UNIQUE NOT NULL column is required for backfills. When running DDL on empty (probably newly created) tables, pgroll errors out because the backfill fails. Since backfill is actually not needed for an empty table, we should consider skipping the backfill step for empty tables. That would allow users to modify the tables that they just created freely.
For example, create a table without identity column, run below migration:
(just removed the primary key part from ./examples/43_create_tickets_table.json)
./pgroll start ./examples/44_add_table_unique_constraint.json --complete
ERROR Failed to start migration: unable to backfill table "tickets": a backfill is required but table "tickets" doesn't have a single column primary key or a UNIQUE, NOT NULL column
The text was updated successfully, but these errors were encountered:
Primary key or a
UNIQUE NOT NULL
column is required for backfills. When running DDL on empty (probably newly created) tables,pgroll
errors out because the backfill fails. Since backfill is actually not needed for an empty table, we should consider skipping the backfill step for empty tables. That would allow users to modify the tables that they just created freely.For example, create a table without identity column, run below migration:
(just removed the primary key part from
./examples/43_create_tickets_table.json
)And then try to add a unique constraint, by simply running migration
./examples/44_add_table_unique_constraint.json
The text was updated successfully, but these errors were encountered: