rubenv / sql-migrate

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

Force termination of every sql statement #53

Closed freakingawesome closed 7 years ago

freakingawesome commented 7 years ago

BUG: When sql statements aren't explicitly terminated by either a semicolon or a StatementEnd marker, they are either completely ignored or tacked onto the next Up/Down marker as the first statement.

RESOLUTION: This PR now checks to make sure the buffer has been consumed before switching contexts or ending. If it hasn't been completely consumed, that means something wasn't terminated and it will now be counted as an error.