mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
"""empty message
|
|
|
|
Revision ID: fd25bf3e57c3
|
|
Revises: d6ae9682c45f
|
|
Create Date: 2019-11-26 23:43:47.476346
|
|
|
|
"""
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'fd25bf3e57c3'
|
|
down_revision = 'd6ae9682c45f'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('api_token',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('access_token', sa.String(length=34), nullable=True),
|
|
sa.Column('name', sa.String(length=100), nullable=False),
|
|
sa.Column('owner_id', sa.Integer(), nullable=False),
|
|
sa.Column('created_at', sa.DateTime(), nullable=False),
|
|
sa.ForeignKeyConstraint(['owner_id'], ['user.id'], ),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('access_token')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('api_token')
|
|
# ### end Alembic commands ###
|