flask-login-example/migrations/versions/bac269047aed_.py
Andros Fenollosa f056300d27 First commit
2017-05-17 20:16:30 +02:00

38 lines
1008 B
Python

"""empty message
Revision ID: bac269047aed
Revises:
Create Date: 2017-05-17 20:12:42.895838
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bac269047aed'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('users',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('username', sa.String(length=30), nullable=False),
sa.Column('email', sa.String(length=254), nullable=False),
sa.Column('password', sa.String(length=106), nullable=False),
sa.Column('is_active', sa.Boolean(), nullable=True),
sa.Column('token', sa.String(length=100), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('users')
# ### end Alembic commands ###