41 lines
1.5 KiB
Python
41 lines
1.5 KiB
Python
|
"""drop mirror table
|
||
|
|
||
|
Revision ID: 1842ba85a5c7
|
||
|
Revises: 9f5525e84960
|
||
|
Create Date: 2022-05-17 09:28:13.172061
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
from sqlalchemy.dialects import postgresql
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '1842ba85a5c7'
|
||
|
down_revision = '9f5525e84960'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table('mirror')
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table('mirror',
|
||
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
||
|
sa.Column('origin_id', sa.INTEGER(), autoincrement=False, nullable=False),
|
||
|
sa.Column('url', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
|
||
|
sa.Column('added', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
|
||
|
sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
|
||
|
sa.Column('deprecated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
|
||
|
sa.Column('destroyed', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
|
||
|
sa.Column('deprecation_reason', sa.VARCHAR(), autoincrement=False, nullable=True),
|
||
|
sa.ForeignKeyConstraint(['origin_id'], ['origin.id'], name='fk_mirror_origin_id_origin'),
|
||
|
sa.PrimaryKeyConstraint('id', name='pk_mirror'),
|
||
|
sa.UniqueConstraint('url', name='uq_mirror_url')
|
||
|
)
|
||
|
# ### end Alembic commands ###
|