"""empty message

Revision ID: 9d48257d000e
Revises: <KEY>
Create Date: 2020-08-04 09:04:45.551685

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '9d48257d000e'
down_revision = '<KEY>'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('payments',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('payment_id', sa.String(length=4096), nullable=True),
    sa.Column('payment_completion_date', sa.DateTime(timezone=True), nullable=True),
    sa.Column('payment_status_code', sa.String(length=50), nullable=True),
    sa.Column('nr_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['nr_id'], ['requests.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_payments_nr_id'), 'payments', ['nr_id'], unique=False)

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_payments_nr_id'), table_name='payments')
    op.drop_table('payments')
    # ### end Alembic commands ###
