Coverage for opt/mealie/lib/python3.12/site-packages/mealie/alembic/versions/2023-08-15-16.25.07_bcfdad6b7355_remove_tool_name_and_slug_unique_.py: 73%
15 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:32 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:32 +0000
1"""remove tool name and slug unique contraints
3Revision ID: bcfdad6b7355
4Revises: 1825b5225403
5Create Date: 2023-08-15 16:25:07.058929
7"""
9from alembic import op 1a
11# revision identifiers, used by Alembic.
12revision = "bcfdad6b7355" 1a
13down_revision = "1825b5225403" 1a
14branch_labels: str | tuple[str, ...] | None = None 1a
15depends_on: str | tuple[str, ...] | None = None 1a
18def upgrade(): 1a
19 # ### commands auto generated by Alembic - please adjust! ###
20 op.drop_index("ix_tools_name", table_name="tools") 1a
21 op.create_index(op.f("ix_tools_name"), "tools", ["name"], unique=False) 1a
22 op.drop_index("ix_tools_slug", table_name="tools") 1a
23 op.create_index(op.f("ix_tools_slug"), "tools", ["slug"], unique=False) 1a
24 # ### end Alembic commands ###
27def downgrade(): 1a
28 # ### commands auto generated by Alembic - please adjust! ###
29 op.drop_index(op.f("ix_tools_slug"), table_name="tools")
30 op.create_index("ix_tools_slug", "tools", ["slug"], unique=True)
31 op.drop_index(op.f("ix_tools_name"), table_name="tools")
32 op.create_index("ix_tools_name", "tools", ["name"], unique=True)
33 # ### end Alembic commands ###