mirror of
https://github.com/therootcompany/golib.git
synced 2026-04-02 19:17:59 +00:00
The create subcommand generated .up.sql files with INSERT INTO _migrations as the FIRST statement, before the actual DDL. If the DDL fails, the migration is incorrectly marked as applied. Move the INSERT to be the LAST statement, matching how .down.sql already puts DELETE FROM _migrations last. Also fix the automatic fixup logic to append (not prepend) missing INSERT statements to existing .up.sql files. Fixes #86