Skip to content

Commit

Permalink
Merged branch feature/relax-index-on-timeplans into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
horia141 committed Jun 1, 2024
1 parent 6eace29 commit feb0264
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""Relax constraints on time plans
Revision ID: ea359cf44393
Revises: 2be36a76f15d
Create Date: 2024-06-01 20:42:47.967135
"""
from alembic import op


# revision identifiers, used by Alembic.
revision = "ea359cf44393"
down_revision = "2be36a76f15d"
branch_labels = None
depends_on = None


def upgrade() -> None:
op.execute("""DROP INDEX ix_time_plan_time_plan_domain_ref_id_right_now""")
op.execute(
"""
CREATE UNIQUE INDEX ix_time_plan_time_plan_domain_ref_id_period_right_now ON time_plan (time_plan_domain_ref_id, period, right_now)
WHERE archived=0;
"""
)


def downgrade() -> None:
pass

0 comments on commit feb0264

Please sign in to comment.