1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-23 01:20:00 +00:00
nyaa/migrations/versions/6cc823948c5a_add_trackerapi.py
2018-02-12 15:52:35 -08:00

41 lines
1.1 KiB
Python

"""Add trackerapi table
Revision ID: 6cc823948c5a
Revises: b61e4f6a88cc
Create Date: 2018-02-11 20:57:15.244171
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6cc823948c5a'
down_revision = 'b61e4f6a88cc'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('nyaa_trackerapi',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('info_hash', sa.BINARY(length=20), nullable=False),
sa.Column('method', sa.String(length=255), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('sukebei_trackerapi',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('info_hash', sa.BINARY(length=20), nullable=False),
sa.Column('method', sa.String(length=255), nullable=False),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('sukebei_trackerapi')
op.drop_table('nyaa_trackerapi')
# ### end Alembic commands ###