"""Added User, Customer and Card Tables

Revision ID: 2129f31651d3
Revises: 
Create Date: 2019-03-10 21:18:30.757000

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2129f31651d3'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('card',
    sa.Column('addressState', sa.String(length=120), nullable=True),
    sa.Column('expMonth', sa.Integer(), nullable=True),
    sa.Column('expYear', sa.Integer(), nullable=True),
    sa.Column('addressCity', sa.String(length=40), nullable=True),
    sa.Column('addressZip', sa.Integer(), nullable=True),
    sa.Column('cvv', sa.Integer(), nullable=True),
    sa.Column('number', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('number')
    )
    op.create_table('customer',
    sa.Column('email', sa.String(length=120), nullable=False),
    sa.Column('addressState', sa.String(length=120), nullable=True),
    sa.Column('expMonth', sa.Integer(), nullable=True),
    sa.Column('expYear', sa.Integer(), nullable=True),
    sa.Column('addressCity', sa.String(length=40), nullable=True),
    sa.Column('addressZip', sa.Integer(), nullable=True),
    sa.Column('cvv', sa.Integer(), nullable=True),
    sa.Column('cardNumber', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('email', 'cardNumber')
    )
    op.create_index(op.f('ix_customer_email'), 'customer', ['email'], unique=False)
    op.create_table('user',
    sa.Column('email', sa.String(length=120), nullable=False),
    sa.Column('password_hash', sa.String(length=128), nullable=True),
    sa.PrimaryKeyConstraint('email')
    )
    op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_index(op.f('ix_customer_email'), table_name='customer')
    op.drop_table('customer')
    op.drop_table('card')
    # ### end Alembic commands ###

6e4f4cf66719ffaee7ec2ab113a0c126ae8c597c
<mask token>


def downgrade():
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_index(op.f('ix_customer_email'), table_name='customer')
    op.drop_table('customer')
    op.drop_table('card')

<mask token>


def upgrade():
    op.create_table('card', sa.Column('addressState', sa.String(length=120),
        nullable=True), sa.Column('expMonth', sa.Integer(), nullable=True),
        sa.Column('expYear', sa.Integer(), nullable=True), sa.Column(
        'addressCity', sa.String(length=40), nullable=True), sa.Column(
        'addressZip', sa.Integer(), nullable=True), sa.Column('cvv', sa.
        Integer(), nullable=True), sa.Column('number', sa.Integer(),
        nullable=False), sa.PrimaryKeyConstraint('number'))
    op.create_table('customer', sa.Column('email', sa.String(length=120),
        nullable=False), sa.Column('addressState', sa.String(length=120),
        nullable=True), sa.Column('expMonth', sa.Integer(), nullable=True),
        sa.Column('expYear', sa.Integer(), nullable=True), sa.Column(
        'addressCity', sa.String(length=40), nullable=True), sa.Column(
        'addressZip', sa.Integer(), nullable=True), sa.Column('cvv', sa.
        Integer(), nullable=True), sa.Column('cardNumber', sa.Integer(),
        nullable=False), sa.PrimaryKeyConstraint('email', 'cardNumber'))
    op.create_index(op.f('ix_customer_email'), 'customer', ['email'],
        unique=False)
    op.create_table('user', sa.Column('email', sa.String(length=120),
        nullable=False), sa.Column('password_hash', sa.String(length=128),
        nullable=True), sa.PrimaryKeyConstraint('email'))
    op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_index(op.f('ix_customer_email'), table_name='customer')
    op.drop_table('customer')
    op.drop_table('card')

<mask token>
revision = '2129f31651d3'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('card', sa.Column('addressState', sa.String(length=120),
        nullable=True), sa.Column('expMonth', sa.Integer(), nullable=True),
        sa.Column('expYear', sa.Integer(), nullable=True), sa.Column(
        'addressCity', sa.String(length=40), nullable=True), sa.Column(
        'addressZip', sa.Integer(), nullable=True), sa.Column('cvv', sa.
        Integer(), nullable=True), sa.Column('number', sa.Integer(),
        nullable=False), sa.PrimaryKeyConstraint('number'))
    op.create_table('customer', sa.Column('email', sa.String(length=120),
        nullable=False), sa.Column('addressState', sa.String(length=120),
        nullable=True), sa.Column('expMonth', sa.Integer(), nullable=True),
        sa.Column('expYear', sa.Integer(), nullable=True), sa.Column(
        'addressCity', sa.String(length=40), nullable=True), sa.Column(
        'addressZip', sa.Integer(), nullable=True), sa.Column('cvv', sa.
        Integer(), nullable=True), sa.Column('cardNumber', sa.Integer(),
        nullable=False), sa.PrimaryKeyConstraint('email', 'cardNumber'))
    op.create_index(op.f('ix_customer_email'), 'customer', ['email'],
        unique=False)
    op.create_table('user', sa.Column('email', sa.String(length=120),
        nullable=False), sa.Column('password_hash', sa.String(length=128),
        nullable=True), sa.PrimaryKeyConstraint('email'))
    op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_index(op.f('ix_customer_email'), table_name='customer')
    op.drop_table('customer')
    op.drop_table('card')

<mask token>
from alembic import op
import sqlalchemy as sa
revision = '2129f31651d3'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('card', sa.Column('addressState', sa.String(length=120),
        nullable=True), sa.Column('expMonth', sa.Integer(), nullable=True),
        sa.Column('expYear', sa.Integer(), nullable=True), sa.Column(
        'addressCity', sa.String(length=40), nullable=True), sa.Column(
        'addressZip', sa.Integer(), nullable=True), sa.Column('cvv', sa.
        Integer(), nullable=True), sa.Column('number', sa.Integer(),
        nullable=False), sa.PrimaryKeyConstraint('number'))
    op.create_table('customer', sa.Column('email', sa.String(length=120),
        nullable=False), sa.Column('addressState', sa.String(length=120),
        nullable=True), sa.Column('expMonth', sa.Integer(), nullable=True),
        sa.Column('expYear', sa.Integer(), nullable=True), sa.Column(
        'addressCity', sa.String(length=40), nullable=True), sa.Column(
        'addressZip', sa.Integer(), nullable=True), sa.Column('cvv', sa.
        Integer(), nullable=True), sa.Column('cardNumber', sa.Integer(),
        nullable=False), sa.PrimaryKeyConstraint('email', 'cardNumber'))
    op.create_index(op.f('ix_customer_email'), 'customer', ['email'],
        unique=False)
    op.create_table('user', sa.Column('email', sa.String(length=120),
        nullable=False), sa.Column('password_hash', sa.String(length=128),
        nullable=True), sa.PrimaryKeyConstraint('email'))
    op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_index(op.f('ix_customer_email'), table_name='customer')
    op.drop_table('customer')
    op.drop_table('card')

"""Added User, Customer and Card Tables

Revision ID: 2129f31651d3
Revises: 
Create Date: 2019-03-10 21:18:30.757000

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '2129f31651d3'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('card',
    sa.Column('addressState', sa.String(length=120), nullable=True),
    sa.Column('expMonth', sa.Integer(), nullable=True),
    sa.Column('expYear', sa.Integer(), nullable=True),
    sa.Column('addressCity', sa.String(length=40), nullable=True),
    sa.Column('addressZip', sa.Integer(), nullable=True),
    sa.Column('cvv', sa.Integer(), nullable=True),
    sa.Column('number', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('number')
    )
    op.create_table('customer',
    sa.Column('email', sa.String(length=120), nullable=False),
    sa.Column('addressState', sa.String(length=120), nullable=True),
    sa.Column('expMonth', sa.Integer(), nullable=True),
    sa.Column('expYear', sa.Integer(), nullable=True),
    sa.Column('addressCity', sa.String(length=40), nullable=True),
    sa.Column('addressZip', sa.Integer(), nullable=True),
    sa.Column('cvv', sa.Integer(), nullable=True),
    sa.Column('cardNumber', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('email', 'cardNumber')
    )
    op.create_index(op.f('ix_customer_email'), 'customer', ['email'], unique=False)
    op.create_table('user',
    sa.Column('email', sa.String(length=120), nullable=False),
    sa.Column('password_hash', sa.String(length=128), nullable=True),
    sa.PrimaryKeyConstraint('email')
    )
    op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_user_email'), table_name='user')
    op.drop_table('user')
    op.drop_index(op.f('ix_customer_email'), table_name='customer')
    op.drop_table('customer')
    op.drop_table('card')
    # ### end Alembic commands ###
