34 lines
842 B
Python
34 lines
842 B
Python
"""Add the User table
|
|
|
|
Revision ID: 293b84dc3f9e
|
|
Revises: 15f5eeb9f635
|
|
Create Date: 2015-04-29 13:44:16.481727
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '293b84dc3f9e'
|
|
down_revision = '15f5eeb9f635'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
def upgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('user',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('username', sa.String(length=80), nullable=True),
|
|
sa.Column('pw_hash', sa.String(length=120), nullable=True),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('username')
|
|
)
|
|
### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('user')
|
|
### end Alembic commands ###
|