MonScoDocEssai/migrations/versions/45e0a855b8eb_assiduites_external_data.py
2023-07-31 16:16:18 +02:00

34 lines
954 B
Python

"""assiduites_external_data
Revision ID: 45e0a855b8eb
Revises: 50f7e0b6229f
Create Date: 2023-07-31 07:32:18.674345
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "45e0a855b8eb"
down_revision = "50f7e0b6229f"
branch_labels = None
depends_on = None
def upgrade():
with op.batch_alter_table("assiduites", schema=None) as batch_op:
batch_op.add_column(sa.Column("external_data", sa.JSON(), nullable=True))
with op.batch_alter_table("justificatifs", schema=None) as batch_op:
batch_op.add_column(sa.Column("external_data", sa.JSON(), nullable=True))
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("justificatifs", schema=None) as batch_op:
batch_op.drop_column("external_data")
with op.batch_alter_table("assiduites", schema=None) as batch_op:
batch_op.drop_column("external_data")