"""payments

Revision ID: 67c976b28a84
Revises: f2f28b21fac7
Create Date: 2021-06-22 11:51:20.715768

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '67c976b28a84'
down_revision = 'f2f28b21fac7'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('payments',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('firstname', sa.String(length=50), nullable=True),
    sa.Column('surname', sa.String(length=50), nullable=True),
    sa.Column('address', sa.String(length=100), nullable=True),
    sa.Column('town', sa.String(length=100), nullable=True),
    sa.Column('city', sa.String(length=100), nullable=True),
    sa.Column('postcode', sa.String(length=7), nullable=True),
    sa.Column('phone', sa.String(length=11), nullable=True),
    sa.Column('service', sa.String(length=200), nullable=True),
    sa.Column('amount', sa.Numeric(precision=10, scale=2), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.Column('cardno', sa.String(length=16), nullable=True),
    sa.Column('expirydate', sa.String(length=5), nullable=True),
    sa.Column('securitycode', sa.String(length=3), nullable=True),
    sa.Column('date', sa.Date(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['users2.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


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