db migrate

This commit is contained in:
Éric Li 2021-05-06 18:16:57 +02:00
parent e70b3e70f5
commit 16ef57e019
2 changed files with 76 additions and 0 deletions

BIN
app.db

Binary file not shown.

View File

@ -0,0 +1,76 @@
"""empty message
Revision ID: c000b3a8d714
Revises: c1377d41bf27
Create Date: 2021-05-06 17:50:35.360220
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c000b3a8d714'
down_revision = 'c1377d41bf27'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('AC',
sa.Column('code', sa.String(length=6), nullable=False),
sa.Column('titre', sa.String(length=255), nullable=True),
sa.Column('saes', sa.String(length=255), nullable=True),
sa.PrimaryKeyConstraint('code')
)
op.create_table('SAE',
sa.Column('code', sa.String(length=5), nullable=False),
sa.Column('titre', sa.String(length=255), nullable=True),
sa.Column('semestre', sa.String(length=255), nullable=True),
sa.Column('heures_encadrees', sa.String(length=3), nullable=True),
sa.Column('heures_tp', sa.String(length=3), nullable=True),
sa.Column('projet', sa.String(length=3), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('coef', sa.String(length=255), nullable=True),
sa.Column('acs', sa.String(length=255), nullable=True),
sa.Column('ressources', sa.String(length=255), nullable=True),
sa.Column('livrables', sa.Text(), nullable=True),
sa.Column('motscles', sa.String(length=255), nullable=True),
sa.PrimaryKeyConstraint('code')
)
op.create_table('competence',
sa.Column('code', sa.String(length=3), nullable=False),
sa.Column('nom', sa.String(length=255), nullable=True),
sa.Column('diminutif', sa.String(length=30), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.Column('composantes', sa.Text(), nullable=True),
sa.Column('situations', sa.Text(), nullable=True),
sa.Column('niveaux', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('code')
)
op.create_table('ressource',
sa.Column('code', sa.String(length=4), nullable=False),
sa.Column('nom', sa.String(length=255), nullable=True),
sa.Column('semestre', sa.String(length=255), nullable=True),
sa.Column('heures_formation', sa.String(length=3), nullable=True),
sa.Column('heures_tp', sa.String(length=3), nullable=True),
sa.Column('coef', sa.String(length=255), nullable=True),
sa.Column('acs', sa.String(length=255), nullable=True),
sa.Column('saes', sa.String(length=255), nullable=True),
sa.Column('prerequis', sa.String(length=255), nullable=True),
sa.Column('contexte', sa.Text(), nullable=True),
sa.Column('contenu', sa.Text(), nullable=True),
sa.Column('motscles', sa.String(length=255), nullable=True),
sa.PrimaryKeyConstraint('code')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('ressource')
op.drop_table('competence')
op.drop_table('SAE')
op.drop_table('AC')
# ### end Alembic commands ###