mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-14 11:33:51 +01:00
27 lines
648 B
Python
27 lines
648 B
Python
"""empty message
|
|
|
|
Revision ID: df66c78e6791
|
|
Revises: a0f6c8743362
|
|
Create Date: 2020-01-24 18:39:58.363417
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'df66c78e6791'
|
|
down_revision = 'a0f6c8743362'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('api_token', sa.Column('package_id', sa.Integer(), nullable=True))
|
|
op.create_foreign_key(None, 'api_token', 'package', ['package_id'], ['id'])
|
|
|
|
|
|
def downgrade():
|
|
op.drop_constraint(None, 'api_token', type_='foreignkey')
|
|
op.drop_column('api_token', 'package_id')
|