mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 13:05:21 +02:00
fix: Tools Shouldn't Be Unique Across Groups (#2505)
* fixed type/abc errors in tests * fixed false positive multitentant tests * fix tools not allowing unique slugs across groups * fixed alembic refs --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
parent
99e7717fec
commit
c9cc7a93c8
9 changed files with 62 additions and 29 deletions
|
@ -0,0 +1,32 @@
|
|||
"""remove tool name and slug unique contraints
|
||||
|
||||
Revision ID: bcfdad6b7355
|
||||
Revises: 1825b5225403
|
||||
Create Date: 2023-08-15 16:25:07.058929
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "bcfdad6b7355"
|
||||
down_revision = "1825b5225403"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index("ix_tools_name", table_name="tools")
|
||||
op.create_index(op.f("ix_tools_name"), "tools", ["name"], unique=False)
|
||||
op.drop_index("ix_tools_slug", table_name="tools")
|
||||
op.create_index(op.f("ix_tools_slug"), "tools", ["slug"], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f("ix_tools_slug"), table_name="tools")
|
||||
op.create_index("ix_tools_slug", "tools", ["slug"], unique=True)
|
||||
op.drop_index(op.f("ix_tools_name"), table_name="tools")
|
||||
op.create_index("ix_tools_name", "tools", ["name"], unique=True)
|
||||
# ### end Alembic commands ###
|
Loading…
Add table
Add a link
Reference in a new issue