site-specific changes for new tracker (#453)

This commit is contained in:
A nyaa developer
2018-02-13 00:52:35 +01:00
committed by Arylide
parent 7bef642f4e
commit d7b413e4d7
5 changed files with 73 additions and 40 deletions

View File

@@ -0,0 +1,40 @@
"""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 ###