35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""added relationship allocation-classe
|
|
|
|
Revision ID: bbfb79cb9dad
|
|
Revises: 42a297861f20
|
|
Create Date: 2023-01-26 14:41:29.955558
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'bbfb79cb9dad'
|
|
down_revision = '42a297861f20'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('allocation',
|
|
sa.Column('no_cat', sa.Integer(), nullable=False),
|
|
sa.Column('classe_id', sa.Unicode(length=45), nullable=True),
|
|
sa.Column('pc_cible', sa.Integer(), nullable=True),
|
|
sa.Column('pc_atteint', sa.Float(), nullable=True),
|
|
sa.Column('valeur', sa.Float(), nullable=True),
|
|
sa.ForeignKeyConstraint(['classe_id'], ['classes.classe'], name=op.f('fk_allocation_classe_id_classes')),
|
|
sa.PrimaryKeyConstraint('no_cat', name=op.f('pk_allocation'))
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('allocation')
|
|
# ### end Alembic commands ###
|