forked from ScoDoc/ScoDoc
black migration + version 9.3.16
This commit is contained in:
parent
f2f3fd0660
commit
75923c161a
@ -10,49 +10,67 @@ import sqlalchemy as sa
|
|||||||
from sqlalchemy.dialects import postgresql
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = '0b337376e9f7'
|
revision = "0b337376e9f7"
|
||||||
down_revision = 'ee21c76c8183'
|
down_revision = "ee21c76c8183"
|
||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
op.create_table('are_historique',
|
op.create_table(
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
"are_historique",
|
||||||
sa.Column('date', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
|
sa.Column("id", sa.Integer(), nullable=False),
|
||||||
sa.Column('authenticated_user', sa.Text(), nullable=True),
|
sa.Column(
|
||||||
sa.Column('entreprise_id', sa.Integer(), nullable=True),
|
"date",
|
||||||
sa.Column('object', sa.Text(), nullable=True),
|
sa.DateTime(timezone=True),
|
||||||
sa.Column('object_id', sa.Integer(), nullable=True),
|
server_default=sa.text("now()"),
|
||||||
sa.Column('text', sa.Text(), nullable=True),
|
nullable=True,
|
||||||
sa.PrimaryKeyConstraint('id')
|
),
|
||||||
|
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',
|
op.create_table(
|
||||||
sa.Column('id', sa.Integer(), nullable=False),
|
"are_taxe_apprentissage",
|
||||||
sa.Column('entreprise_id', sa.Integer(), nullable=True),
|
sa.Column("id", sa.Integer(), nullable=False),
|
||||||
sa.Column('annee', sa.Integer(), nullable=True),
|
sa.Column("entreprise_id", sa.Integer(), nullable=True),
|
||||||
sa.Column('montant', sa.Integer(), nullable=True),
|
sa.Column("annee", sa.Integer(), nullable=True),
|
||||||
sa.Column('notes', sa.Text(), nullable=True),
|
sa.Column("montant", sa.Integer(), nullable=True),
|
||||||
sa.ForeignKeyConstraint(['entreprise_id'], ['are_entreprises.id'], ondelete='cascade'),
|
sa.Column("notes", sa.Text(), nullable=True),
|
||||||
sa.PrimaryKeyConstraint('id')
|
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 ###
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
op.drop_column('are_entreprises', 'association')
|
op.drop_column("are_entreprises", "association")
|
||||||
op.create_table('are_logs',
|
op.create_table(
|
||||||
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
"are_logs",
|
||||||
sa.Column('date', postgresql.TIMESTAMP(timezone=True), server_default=sa.text('now()'), autoincrement=False, nullable=True),
|
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
|
||||||
sa.Column('authenticated_user', sa.TEXT(), autoincrement=False, nullable=True),
|
sa.Column(
|
||||||
sa.Column('object', sa.INTEGER(), autoincrement=False, nullable=True),
|
"date",
|
||||||
sa.Column('text', sa.TEXT(), autoincrement=False, nullable=True),
|
postgresql.TIMESTAMP(timezone=True),
|
||||||
sa.PrimaryKeyConstraint('id', name='are_logs_pkey')
|
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_taxe_apprentissage")
|
||||||
op.drop_table('are_historique')
|
op.drop_table("are_historique")
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.3.15"
|
SCOVERSION = "9.3.16"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user