45 lines
1.3 KiB
Python
45 lines
1.3 KiB
Python
"""Initial migration
|
|
|
|
Revision ID: 49d24a3cb696
|
|
Revises:
|
|
Create Date: 2019-02-13 19:22:05.984105
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '49d24a3cb696'
|
|
down_revision = None
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('quote',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('quoter', sa.String(length=255), nullable=False),
|
|
sa.Column('quotee', sa.String(length=255), nullable=True),
|
|
sa.Column('channel', sa.String(length=255), nullable=False),
|
|
sa.Column('quote', sa.String(length=16383), nullable=False),
|
|
sa.Column('created_at', sa.DateTime(), nullable=False),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
op.create_table('user',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('username', sa.String(length=255), nullable=False),
|
|
sa.Column('authorized', sa.Boolean(), nullable=True),
|
|
sa.Column('admin', sa.Boolean(), nullable=True),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('username')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('user')
|
|
op.drop_table('quote')
|
|
# ### end Alembic commands ###
|