- Add active field to Specialist model - Improve Specialists view - Propagate make for Role Definition Specialist to Selection Specialist (make is defined at the role level) - Ensure a make with a given name can only be defined once
32 lines
805 B
Python
32 lines
805 B
Python
"""Make TenantMake name unique
|
|
|
|
Revision ID: f40d16a0965a
|
|
Revises: 200bda7f5251
|
|
Create Date: 2025-06-09 06:15:56.791634
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'f40d16a0965a'
|
|
down_revision = '200bda7f5251'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('tenant_make', schema=None) as batch_op:
|
|
batch_op.create_unique_constraint(None, ['name'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('tenant_make', schema=None) as batch_op:
|
|
batch_op.drop_constraint(None, type_='unique')
|
|
|
|
# ### end Alembic commands ###
|