Skip to content

Commit

Permalink
speedup occtax migration when adding id_module col
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl authored and bouttier committed Nov 15, 2022
1 parent 1448c72 commit 1cbf284
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@


def upgrade():
op.execute(
"ALTER TABLE pr_occtax.t_releves_occtax DISABLE TRIGGER tri_update_synthese_t_releve_occtax"
)
op.execute(
"""
ALTER TABLE pr_occtax.t_releves_occtax
Expand All @@ -28,6 +31,9 @@ def upgrade():
SET id_module = (SELECT id_module FROM gn_commons.t_modules WHERE module_code = 'OCCTAX');
"""
)
op.execute(
"ALTER TABLE pr_occtax.t_releves_occtax ENABLE TRIGGER tri_update_synthese_t_releve_occtax"
)


def downgrade():
Expand Down

0 comments on commit 1cbf284

Please sign in to comment.