rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.23k stars 280 forks source link

Comments should be ignored for detecting commands boundaries #70

Open tamalsaha opened 7 years ago

tamalsaha commented 7 years ago

I have a SQL file that ends with a commented out line. SQL migration fails with the following error:

I0404 16:17:30.659541   22029 error.go:293] Error:INTERNAL ERROR: The last statement must be ended by a semicolon or '-- +migrate StatementEnd' marker.
maxatome commented 7 years ago

Same error when a comment is present between -- +migrate StatementEnd and -- +migrate Down

maxatome commented 7 years ago

Seems to be OK with 48fb62e01c6f5d73d6650c4c9f54d1141b3c79a1. Sorry for the noise.