8f2554c45633_.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. """empty message
  2. Revision ID: 8f2554c45633
  3. Revises: b03df3e31b8d
  4. Create Date: 2022-02-09 13:55:07.389805
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '8f2554c45633'
  10. down_revision = 'b03df3e31b8d'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. op.create_table('result_confirmation',
  16. sa.Column('id', sa.Integer(), nullable=False),
  17. sa.Column('result_id', sa.Integer(), nullable=False),
  18. sa.Column('confirming_user', sa.String(), nullable=False),
  19. sa.ForeignKeyConstraint(['result_id'], ['result.id'], ondelete='CASCADE'),
  20. sa.PrimaryKeyConstraint('id')
  21. )
  22. op.add_column('result', sa.Column('origin_user', sa.String(), nullable=True))
  23. # ### end Alembic commands ###
  24. def downgrade():
  25. # ### commands auto generated by Alembic - please adjust! ###
  26. op.drop_column('result', 'origin_user')
  27. op.drop_table('result_confirmation')
  28. # ### end Alembic commands ###