21 lines
685 B
Python
21 lines
685 B
Python
|
|
"""Ajoute le refus motivé des interventions."""
|
||
|
|
from alembic import op
|
||
|
|
import sqlalchemy as sa
|
||
|
|
|
||
|
|
revision = "fe5f6a7b8c9d"
|
||
|
|
down_revision = "fd4e5f6a7b8c"
|
||
|
|
branch_labels = None
|
||
|
|
depends_on = None
|
||
|
|
|
||
|
|
|
||
|
|
def upgrade():
|
||
|
|
op.add_column("interventions", sa.Column("refusal_reason", sa.Text(), nullable=True))
|
||
|
|
op.add_column("interventions", sa.Column("refused_at", sa.DateTime(), nullable=True))
|
||
|
|
op.add_column("interventions", sa.Column("refused_by_id", sa.Integer(), sa.ForeignKey("users.id"), nullable=True))
|
||
|
|
|
||
|
|
|
||
|
|
def downgrade():
|
||
|
|
op.drop_column("interventions", "refused_by_id")
|
||
|
|
op.drop_column("interventions", "refused_at")
|
||
|
|
op.drop_column("interventions", "refusal_reason")
|