39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: fa1fedf4ca08
|
||
|
Revises: edf057ef742a
|
||
|
Create Date: 2019-01-30 19:12:04.385472
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = 'fa1fedf4ca08'
|
||
|
down_revision = 'edf057ef742a'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table('rfp_proposal')
|
||
|
op.add_column('proposal', sa.Column('rfp_id', sa.Integer(), nullable=True))
|
||
|
op.create_foreign_key(None, 'proposal', 'rfp', ['rfp_id'], ['id'])
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_constraint(None, 'proposal', type_='foreignkey')
|
||
|
op.drop_column('proposal', 'rfp_id')
|
||
|
op.create_table('rfp_proposal',
|
||
|
sa.Column('rfp_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
||
|
sa.Column('proposal_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
||
|
sa.ForeignKeyConstraint(['proposal_id'], ['proposal.id'], name='rfp_proposal_proposal_id_fkey'),
|
||
|
sa.ForeignKeyConstraint(['rfp_id'], ['rfp.id'], name='rfp_proposal_rfp_id_fkey'),
|
||
|
sa.UniqueConstraint('proposal_id', name='rfp_proposal_proposal_id_key')
|
||
|
)
|
||
|
# ### end Alembic commands ###
|