|
| 1 | +"""Allow for Spring and Intro eval relationships |
| 2 | +
|
| 3 | +Revision ID: 5615d58892a1 |
| 4 | +Revises: 6f6b843e2b8f |
| 5 | +Create Date: 2017-04-27 15:40:40.640402 |
| 6 | +
|
| 7 | +""" |
| 8 | + |
| 9 | +# revision identifiers, used by Alembic. |
| 10 | +revision = '5615d58892a1' |
| 11 | +down_revision = '6f6b843e2b8f' |
| 12 | + |
| 13 | +from alembic import op |
| 14 | +import sqlalchemy as sa |
| 15 | + |
| 16 | + |
| 17 | +def upgrade(): |
| 18 | + ### commands auto generated by Alembic - please adjust! ### |
| 19 | + op.add_column('conditional', sa.Column('i_evaluation', sa.Integer(), nullable=True)) |
| 20 | + op.add_column('conditional', sa.Column('s_evaluation', sa.Integer(), nullable=True)) |
| 21 | + op.drop_constraint('conditional_evaluation_fkey', 'conditional', type_='foreignkey') |
| 22 | + op.create_foreign_key(None, 'conditional', 'spring_evals', ['s_evaluation'], ['id']) |
| 23 | + op.create_foreign_key(None, 'conditional', 'freshman_eval_data', ['i_evaluation'], ['id']) |
| 24 | + op.drop_column('conditional', 'evaluation') |
| 25 | + ### end Alembic commands ### |
| 26 | + |
| 27 | + |
| 28 | +def downgrade(): |
| 29 | + ### commands auto generated by Alembic - please adjust! ### |
| 30 | + op.add_column('conditional', sa.Column('evaluation', sa.INTEGER(), autoincrement=False, nullable=True)) |
| 31 | + op.drop_constraint(None, 'conditional', type_='foreignkey') |
| 32 | + op.drop_constraint(None, 'conditional', type_='foreignkey') |
| 33 | + op.create_foreign_key('conditional_evaluation_fkey', 'conditional', 'spring_evals', ['evaluation'], ['id']) |
| 34 | + op.drop_column('conditional', 's_evaluation') |
| 35 | + op.drop_column('conditional', 'i_evaluation') |
| 36 | + ### end Alembic commands ### |
0 commit comments