mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Set plugin migration version after a successful migration (#1827)
* Set plugin migration version after successful migrations * Closes #1763
This commit is contained in:
@@ -73,6 +73,9 @@ def upgrade(plugin_name=None, revision=None, lower="current"):
|
||||
for r in revs:
|
||||
with context.begin_transaction():
|
||||
r.module.upgrade(op=op)
|
||||
# Set revision that succeeded so we don't need
|
||||
# to start from the beginning on failure
|
||||
set_config(plugin_name + "_alembic_version", r.revision)
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user