mirror of
https://github.com/yandex/pgmigrate.git
synced 2024-11-13 00:14:22 +03:00
Fix migration error with comment at the end of file
This commit is contained in:
parent
bac96be3e4
commit
20633e6dde
@ -315,6 +315,7 @@ def _get_statements(path):
|
||||
raise MalformedStatement(
|
||||
'Non ascii symbols in file: {0}, {1}'.format(
|
||||
path, text(exc)))
|
||||
data = sqlparse.format(data, strip_comments=True)
|
||||
for statement in sqlparse.parsestream(data, encoding='utf-8'):
|
||||
st_str = text(statement).strip().encode('utf-8')
|
||||
if st_str:
|
||||
|
Loading…
Reference in New Issue
Block a user