When multiple migrations are placed in a single file using the --;; separator, then you can end up with partially applied migrations. For example, if you have the following migration:
CREATE TABLE foo (id int);
--;;
CREATE TABLE bar id int);
The foo table will be created, then bar table creation statement will cause an exception. However, the first statement will not be rolled back and foo table remains after the migration fails.
When multiple migrations are placed in a single file using the
--;;separator, then you can end up with partially applied migrations. For example, if you have the following migration:The
footable will be created, thenbartable creation statement will cause an exception. However, the first statement will not be rolled back andfootable remains after the migration fails.