renumber-migrations: Exclude migration 0209.

Otherwise, this tries to renumber the already merged duplicate 0209s,
which isn't helpful.
This commit is contained in:
Tim Abbott
2019-12-11 16:07:36 -08:00
parent 299896b6ce
commit 3dc19344c0

View File

@@ -64,7 +64,10 @@ if __name__ == '__main__':
for file in file_index:
migration_number = file[0:4]
counter = file_index.count(migration_number)
if counter > 1 and file[0:4] not in stack:
# There are 2 migrations 0209 because of a security
# release requiring a migration.
if counter > 1 and file[0:4] not in stack and migration_number != "0209":
conflicts += [file_name for file_name in files_list if file_name.startswith(migration_number)]
stack.append(migration_number)