backend: теперь универсальные вью принимают параметр для фильтрации

This commit is contained in:
2022-11-19 02:53:32 +03:00
parent 194b5aaff1
commit 9672952d34
4 changed files with 61 additions and 20 deletions

View File

@@ -0,0 +1,32 @@
"""empty message
Revision ID: c42d8e7674e6
Revises: 02142c549a8c
Create Date: 2022-11-19 02:48:49.436977
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c42d8e7674e6'
down_revision = '02142c549a8c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('characters', schema=None) as batch_op:
batch_op.create_unique_constraint(None, ['owner'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('characters', schema=None) as batch_op:
batch_op.drop_constraint(None, type_='unique')
# ### end Alembic commands ###