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
This may not be a bug, but I found it counter intuitive. If it isn't a bug, it's behavior I found undocumented.
This migration assumes the existence of a table, and drops it. On rollback, it creates the table and an associated index.
-- +migrate UpDROPTABLE routes;
-- SQL in section 'Up' is executed when this migration is applied-- +migrate DownCREATETABLEroutes(
id BIGSERIALPRIMARY KEY,
foreign_key BIGINT,
);
CREATEINDEXroutes_foreign_key_idxON routes (foreign_key);
-- SQL section 'Down' is executed when this migration is rolled back
When executing #down on a migrator, this migration will fail because the table doesn't exist when the 'create index' is executed. I believe this is because statement order is reversed during a rollback.
The text was updated successfully, but these errors were encountered:
This may not be a bug, but I found it counter intuitive. If it isn't a bug, it's behavior I found undocumented.
This migration assumes the existence of a table, and drops it. On rollback, it creates the table and an associated index.
When executing
#down
on a migrator, this migration will fail because the table doesn't exist when the 'create index' is executed. I believe this is because statement order is reversed during a rollback.The text was updated successfully, but these errors were encountered: