added portfolio view

This commit is contained in:
2023-01-26 16:22:58 +01:00
parent 060b796636
commit 4a55f94551
16 changed files with 750 additions and 87 deletions

View File

@@ -0,0 +1,30 @@
"""added relationship allocation-classe
Revision ID: 42a297861f20
Revises: 19d939dbc6d0
Create Date: 2023-01-26 14:23:42.771763
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '42a297861f20'
down_revision = '19d939dbc6d0'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('allocation', sa.Column('classe_id', sa.Unicode(length=45), nullable=True))
op.create_foreign_key(op.f('fk_allocation_classe_id_classes'), 'allocation', 'classes', ['classe_id'], ['classe'])
op.drop_column('allocation', 'classe')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('allocation', sa.Column('classe', sa.VARCHAR(length=45), nullable=False))
op.drop_constraint(op.f('fk_allocation_classe_id_classes'), 'allocation', type_='foreignkey')
op.drop_column('allocation', 'classe_id')
# ### end Alembic commands ###