- Add a new 'system' type to dynamic forms, first one defined = 'tenant_make'

- 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
This commit is contained in:
Josako
2025-06-09 11:06:36 +02:00
parent 43ee9139d6
commit c4dcd6a0d3
15 changed files with 679 additions and 13 deletions

View File

@@ -0,0 +1,31 @@
"""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 ###

View File

@@ -0,0 +1,29 @@
"""Add active field to Specialist
Revision ID: a179785e5362
Revises: c71facc0ce7e
Create Date: 2025-06-09 08:30:18.532600
"""
from alembic import op
import sqlalchemy as sa
import pgvector
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'a179785e5362'
down_revision = 'c71facc0ce7e'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('specialist', sa.Column('active', sa.Boolean(), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('specialist', 'active')
# ### end Alembic commands ###