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
When you try to commit a migration which has a --! Message: header in current.sql, and that migration fails for some reason, e.g. syntax error, current.sql is restored, but the --! Message: is lost.
Steps to reproduce
Have contents of current.sql as such:
--! Message: test-migrationDROPTABLE IF EXISTS app_public.table_name CASCADE;
CREATETABLEapp_public.table_name(
id TEXTPRIMARY KEY,
title TEXT, --this comma causes an error
);
run the commit command and get an error like this:
Expected results
Have contents of current.sql the same as before failure:
--! Message: test-migrationDROPTABLE IF EXISTS app_public.table_name CASCADE;
CREATETABLEapp_public.table_name(
id TEXTPRIMARY KEY,
title TEXT, --this comma causes an error
);
Actual results
Actual contents of current.sql are missing the header:
DROPTABLE IF EXISTS app_public.table_name CASCADE;
CREATETABLEapp_public.table_name(
id TEXTPRIMARY KEY,
title TEXT, --this comma causes an error
);
Summary
When you try to commit a migration which has a
--! Message:
header incurrent.sql
, and that migration fails for some reason, e.g. syntax error,current.sql
is restored, but the--! Message:
is lost.Steps to reproduce
Have contents of
current.sql
as such:run the
commit
command and get an error like this:Expected results
Have contents of
current.sql
the same as before failure:Actual results
Actual contents of
current.sql
are missing the header:Additional context
graphile-migrate version 1.0.2.
Possible Solution
Since there is a log before that like
It should be possible to get the message value at least from filename.
The text was updated successfully, but these errors were encountered: