<reponame>madEng84/pycon<filename>users/alembic/versions/1d5fd146e8a5_import_user_model.py<gh_stars>10-100
"""Import user model

Revision ID: <PASSWORD>
Revises: 
Create Date: 2021-01-28 02:55:43.629000

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<PASSWORD>'
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('full_name', sa.String(length=300), nullable=False),
    sa.Column('password', sa.String(length=128), nullable=False),
    sa.Column('username', sa.String(length=100), nullable=True),
    sa.Column('email', sa.String(length=254), nullable=False),
    sa.Column('name', sa.String(length=300), nullable=False),
    sa.Column('gender', sa.String(length=10), nullable=False),
    sa.Column('date_birth', sa.Date(), nullable=True),
    sa.Column('open_to_recruiting', sa.Boolean(), nullable=False),
    sa.Column('open_to_newsletter', sa.Boolean(), nullable=False),
    sa.Column('country', sa.String(length=50), nullable=False),
    sa.Column('date_joined', sa.DateTime(timezone=True), nullable=False),
    sa.Column('last_login', sa.DateTime(timezone=True), nullable=True),
    sa.Column('is_active', sa.Boolean(), nullable=False),
    sa.Column('is_staff', sa.Boolean(), nullable=False),
    sa.Column('is_superuser', sa.Boolean(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('users')
    # ### end Alembic commands ###

"""Import user model

Revision ID: <PASSWORD>
Revises: 
Create Date: 2021-01-28 02:55:43.629000

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<PASSWORD>'
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('full_name', sa.String(length=300), nullable=False),
    sa.Column('password', sa.String(length=128), nullable=False),
    sa.Column('username', sa.String(length=100), nullable=True),
    sa.Column('email', sa.String(length=254), nullable=False),
    sa.Column('name', sa.String(length=300), nullable=False),
    sa.Column('gender', sa.String(length=10), nullable=False),
    sa.Column('date_birth', sa.Date(), nullable=True),
    sa.Column('open_to_recruiting', sa.Boolean(), nullable=False),
    sa.Column('open_to_newsletter', sa.Boolean(), nullable=False),
    sa.Column('country', sa.String(length=50), nullable=False),
    sa.Column('date_joined', sa.DateTime(timezone=True), nullable=False),
    sa.Column('last_login', sa.DateTime(timezone=True), nullable=True),
    sa.Column('is_active', sa.Boolean(), nullable=False),
    sa.Column('is_staff', sa.Boolean(), nullable=False),
    sa.Column('is_superuser', sa.Boolean(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('users')
    # ### end Alembic commands ###
Import user model  Revision ID: <PASSWORD> Revises:  Create Date: 2021-01-28 02:55:43.629000 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###