mirror of
https://github.com/yandex/pgmigrate.git
synced 2024-09-19 08:07:22 +03:00
prepare data for parsestream --> _apply_statement, remove comments, fix error with comment at the end of file
This commit is contained in:
parent
bac96be3e4
commit
e252bae3e1
@ -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