forked from eric.li/EditionPN
db migrate
This commit is contained in:
parent
e70b3e70f5
commit
16ef57e019
76
migrations/versions/c000b3a8d714_.py
Normal file
76
migrations/versions/c000b3a8d714_.py
Normal 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 ###
|
Loading…
Reference in New Issue
Block a user