Skip to content

Commit 326de71

Browse files
committed
migration:
1 parent fdae0a9 commit 326de71

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"""add uniqu constraint in licensed_items
2+
3+
Revision ID: e71ea59858f4
4+
Revises: 4f31760a63ba
5+
Create Date: 2025-01-30 18:42:15.192968+00:00
6+
7+
"""
8+
from alembic import op
9+
10+
# revision identifiers, used by Alembic.
11+
revision = "e71ea59858f4"
12+
down_revision = "4f31760a63ba"
13+
branch_labels = None
14+
depends_on = None
15+
16+
17+
def upgrade():
18+
# ### commands auto generated by Alembic - please adjust! ###
19+
op.create_unique_constraint(
20+
"uq_licensed_resource_name_type",
21+
"licensed_items",
22+
["licensed_resource_name", "licensed_resource_type"],
23+
)
24+
# ### end Alembic commands ###
25+
26+
27+
def downgrade():
28+
# ### commands auto generated by Alembic - please adjust! ###
29+
op.drop_constraint(
30+
"uq_licensed_resource_name_type", "licensed_items", type_="unique"
31+
)
32+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)