mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
renumber-migrations: Fix construction of new number.
This commit is contained in:
@@ -35,7 +35,8 @@ def renumber_migration(conflicts, order, last_correct_migration):
|
||||
print(re.sub(r'[\d]+(_[a-z0-9]+)+', last_correct_migration, line), end='')
|
||||
|
||||
# Rename the migration indexing at the end
|
||||
new_name = conflicts[i-1].replace(conflicts[i-1][0:4], '00' + str(int(last_correct_migration[0:4]) + 1))
|
||||
new_name = conflicts[i-1].replace(conflicts[i-1][0:4],
|
||||
'%04d' % (int(last_correct_migration[0:4]) + 1,))
|
||||
os.rename('zerver/migrations/' + conflicts[i-1], 'zerver/migrations/' + new_name)
|
||||
|
||||
last_correct_migration = new_name.replace('.py', '')
|
||||
|
||||
Reference in New Issue
Block a user