fix(manifest): collect all migrations when parsing plain SQL dump
This commit is contained in:
1 parent
7116215477
commit
267aca4fbe
1 file changed
+2
-1
@@ -140,6 +140,7 @@ def query_db_metadata(tcfg, dump_path):
|
|||||||
|
|
||||||
# Fallback: parse migrations and table row counts from plain SQL dump
|
# Fallback: parse migrations and table row counts from plain SQL dump
|
||||||
if detect_dump_format(dump_path) == 'plain':
|
if detect_dump_format(dump_path) == 'plain':
|
||||||
|
parse_migrations = not migrations
|
||||||
in_copy = False
|
in_copy = False
|
||||||
curr_table = None
|
curr_table = None
|
||||||
tcount = 0
|
tcount = 0
|
||||||
@@ -163,7 +164,7 @@ def query_db_metadata(tcfg, dump_path):
|
|||||||
tcount = 0
|
tcount = 0
|
||||||
else:
|
else:
|
||||||
tcount += 1
|
tcount += 1
|
||||||
if curr_table == 'schema_migrations' and not migrations:
|
if parse_migrations and curr_table == 'schema_migrations':
|
||||||
parts = line.rstrip('\r\n').split('\t')
|
parts = line.rstrip('\r\n').split('\t')
|
||||||
if len(parts) >= 2:
|
if len(parts) >= 2:
|
||||||
migrations.append(parts[1])
|
migrations.append(parts[1])
|
||||||
|
|||||||
Reference in new issue
Block a user