From 75923c161acacb1dd5dca8070db354b0ac55eae0 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 7 Jul 2022 16:39:27 +0200 Subject: [PATCH] black migration + version 9.3.16 --- ...7_ajout_taxe_apprentissage_association_.py | 80 ++++++++++++------- sco_version.py | 2 +- 2 files changed, 50 insertions(+), 32 deletions(-) diff --git a/migrations/versions/0b337376e9f7_ajout_taxe_apprentissage_association_.py b/migrations/versions/0b337376e9f7_ajout_taxe_apprentissage_association_.py index c8635598..46b7bee6 100644 --- a/migrations/versions/0b337376e9f7_ajout_taxe_apprentissage_association_.py +++ b/migrations/versions/0b337376e9f7_ajout_taxe_apprentissage_association_.py @@ -10,49 +10,67 @@ import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. -revision = '0b337376e9f7' -down_revision = 'ee21c76c8183' +revision = "0b337376e9f7" +down_revision = "ee21c76c8183" branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.create_table('are_historique', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('date', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True), - sa.Column('authenticated_user', sa.Text(), nullable=True), - sa.Column('entreprise_id', sa.Integer(), nullable=True), - sa.Column('object', sa.Text(), nullable=True), - sa.Column('object_id', sa.Integer(), nullable=True), - sa.Column('text', sa.Text(), nullable=True), - sa.PrimaryKeyConstraint('id') + op.create_table( + "are_historique", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column( + "date", + sa.DateTime(timezone=True), + server_default=sa.text("now()"), + nullable=True, + ), + sa.Column("authenticated_user", sa.Text(), nullable=True), + sa.Column("entreprise_id", sa.Integer(), nullable=True), + sa.Column("object", sa.Text(), nullable=True), + sa.Column("object_id", sa.Integer(), nullable=True), + sa.Column("text", sa.Text(), nullable=True), + sa.PrimaryKeyConstraint("id"), ) - op.create_table('are_taxe_apprentissage', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('entreprise_id', sa.Integer(), nullable=True), - sa.Column('annee', sa.Integer(), nullable=True), - sa.Column('montant', sa.Integer(), nullable=True), - sa.Column('notes', sa.Text(), nullable=True), - sa.ForeignKeyConstraint(['entreprise_id'], ['are_entreprises.id'], ondelete='cascade'), - sa.PrimaryKeyConstraint('id') + op.create_table( + "are_taxe_apprentissage", + sa.Column("id", sa.Integer(), nullable=False), + sa.Column("entreprise_id", sa.Integer(), nullable=True), + sa.Column("annee", sa.Integer(), nullable=True), + sa.Column("montant", sa.Integer(), nullable=True), + sa.Column("notes", sa.Text(), nullable=True), + sa.ForeignKeyConstraint( + ["entreprise_id"], ["are_entreprises.id"], ondelete="cascade" + ), + sa.PrimaryKeyConstraint("id"), + ) + op.drop_table("are_logs") + op.add_column( + "are_entreprises", sa.Column("association", sa.Boolean(), nullable=True) ) - op.drop_table('are_logs') - op.add_column('are_entreprises', sa.Column('association', sa.Boolean(), nullable=True)) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.drop_column('are_entreprises', 'association') - op.create_table('are_logs', - sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False), - sa.Column('date', postgresql.TIMESTAMP(timezone=True), server_default=sa.text('now()'), autoincrement=False, nullable=True), - sa.Column('authenticated_user', sa.TEXT(), autoincrement=False, nullable=True), - sa.Column('object', sa.INTEGER(), autoincrement=False, nullable=True), - sa.Column('text', sa.TEXT(), autoincrement=False, nullable=True), - sa.PrimaryKeyConstraint('id', name='are_logs_pkey') + op.drop_column("are_entreprises", "association") + op.create_table( + "are_logs", + sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False), + sa.Column( + "date", + postgresql.TIMESTAMP(timezone=True), + server_default=sa.text("now()"), + autoincrement=False, + nullable=True, + ), + sa.Column("authenticated_user", sa.TEXT(), autoincrement=False, nullable=True), + sa.Column("object", sa.INTEGER(), autoincrement=False, nullable=True), + sa.Column("text", sa.TEXT(), autoincrement=False, nullable=True), + sa.PrimaryKeyConstraint("id", name="are_logs_pkey"), ) - op.drop_table('are_taxe_apprentissage') - op.drop_table('are_historique') + op.drop_table("are_taxe_apprentissage") + op.drop_table("are_historique") # ### end Alembic commands ### diff --git a/sco_version.py b/sco_version.py index ed3c66a3..256794b7 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.3.15" +SCOVERSION = "9.3.16" SCONAME = "ScoDoc"