37 lines
994 B
Python
37 lines
994 B
Python
"""added targets
|
|
|
|
Revision ID: 294a2085f840
|
|
Revises: 14ceaaaa6e85
|
|
Create Date: 2021-09-21 21:20:27.226540
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '294a2085f840'
|
|
down_revision = '14ceaaaa6e85'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('target',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('name', sa.String(length=255), nullable=False),
|
|
sa.Column('routing_key', sa.String(length=255), nullable=False),
|
|
sa.Column('target_exchange_id', sa.Integer(), nullable=False),
|
|
sa.ForeignKeyConstraint(['target_exchange_id'], ['target-exchange.id'], ),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('name')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('target')
|
|
# ### end Alembic commands ###
|