refac
Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
This commit is contained in:
1 parent
73d2065227
commit
9263b7568e
3 files changed
+13
-5
No files matched your search
@@ -42,7 +42,7 @@ def upgrade():
|
||||
sa.Column('updated_at', sa.BigInteger(), nullable=False),
|
||||
)
|
||||
|
||||
# Re-check tables in case we just created it
|
||||
inspector.clear_cache()
|
||||
if 'automation' in inspector.get_table_names():
|
||||
if not _index_exists(inspector, 'ix_automation_next_run', 'automation'):
|
||||
op.create_index('ix_automation_next_run', 'automation', ['next_run_at'])
|
||||
@@ -58,6 +58,7 @@ def upgrade():
|
||||
sa.Column('created_at', sa.BigInteger(), nullable=False),
|
||||
)
|
||||
|
||||
inspector.clear_cache()
|
||||
if 'automation_run' in inspector.get_table_names():
|
||||
if not _index_exists(inspector, 'ix_automation_run_automation_id', 'automation_run'):
|
||||
op.create_index(
|
||||
|
||||
Reference in new issue
Block a user