From 16ef57e019683e25c83b62756964e8b9e7de1c9c Mon Sep 17 00:00:00 2001 From: Nekori Date: Thu, 6 May 2021 18:16:57 +0200 Subject: [PATCH] db migrate --- app.db | Bin 20480 -> 53248 bytes migrations/versions/c000b3a8d714_.py | 76 +++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 migrations/versions/c000b3a8d714_.py diff --git a/app.db b/app.db index 87405cc7ab5501f8b1c3c8ad5e0f022ad03050c5..2d7867652713f4befb68e1bb11f8d3bb11e23082 100644 GIT binary patch delta 1193 zcmcJPzi*Ua9L6E0aKHiLMQPIExJ#O}Nn;MLXLY+*Li~}lHi$nqLbpx)9bdr~NzU{g%kd*Fju|C2kaSl%s}?rhtYB6!LG&8a=lLO z@yK2uzz{}}ABRp+R5e2frmmRaPES|zd1ZlR9KR2hr@+we0b^k~c`Y=zBj~{hg@t^h z(^*_nSmp(c({HT}KlE(m`osLYc6k~Ff9Q@6H*#sbm+eGTT4cjiw0@fzuMEQUM_$G5 z^m@l1BDjU1V(QOLY%mjsaX$8Z6gdODX=%^oyD&?sRZ7n|dc+d|(vA|2F#z_*6&8 delta 92 zcmZozz}&Eaae}lU8v_FaD-go~^F$qEQ8orW=fk}GKNwi}92od{`FHX;@V(e9C~$^% evjg8&L2g51bMq7v!=yAL^Gyn0`H}gH3={xHniR$W diff --git a/migrations/versions/c000b3a8d714_.py b/migrations/versions/c000b3a8d714_.py new file mode 100644 index 0000000..841af97 --- /dev/null +++ b/migrations/versions/c000b3a8d714_.py @@ -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 ###