"""Add balance table

Revision ID: 0cca41f7deac
Revises: bff62620fe69
Create Date: 2020-10-19 19:09:45.864588

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '0cca41f7deac'
down_revision = 'bff62620fe69'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('balances',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('account_id', sa.String(), nullable=False),
    sa.Column('available', sa.DECIMAL(precision=11, scale=2), nullable=False),
    sa.Column('current', sa.DECIMAL(precision=11, scale=2), nullable=False),
    sa.Column('limit', sa.DECIMAL(precision=11, scale=2), nullable=True),
    sa.Column('currency', sa.String(), nullable=False),
    sa.Column('timestamp', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['account_id'], ['accounts.account_id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_balances_id'), 'balances', ['id'], unique=False)
    # ### end Alembic commands ###


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

6149ad6b237d0ca9147a315206471d52149bd502
<mask token>


def upgrade():
    op.create_table('balances', sa.Column('id', sa.Integer(), nullable=
        False), sa.Column('account_id', sa.String(), nullable=False), sa.
        Column('available', sa.DECIMAL(precision=11, scale=2), nullable=
        False), sa.Column('current', sa.DECIMAL(precision=11, scale=2),
        nullable=False), sa.Column('limit', sa.DECIMAL(precision=11, scale=
        2), nullable=True), sa.Column('currency', sa.String(), nullable=
        False), sa.Column('timestamp', sa.DateTime(), nullable=False), sa.
        ForeignKeyConstraint(['account_id'], ['accounts.account_id']), sa.
        PrimaryKeyConstraint('id'))
    op.create_index(op.f('ix_balances_id'), 'balances', ['id'], unique=False)


<mask token>

<mask token>


def upgrade():
    op.create_table('balances', sa.Column('id', sa.Integer(), nullable=
        False), sa.Column('account_id', sa.String(), nullable=False), sa.
        Column('available', sa.DECIMAL(precision=11, scale=2), nullable=
        False), sa.Column('current', sa.DECIMAL(precision=11, scale=2),
        nullable=False), sa.Column('limit', sa.DECIMAL(precision=11, scale=
        2), nullable=True), sa.Column('currency', sa.String(), nullable=
        False), sa.Column('timestamp', sa.DateTime(), nullable=False), sa.
        ForeignKeyConstraint(['account_id'], ['accounts.account_id']), sa.
        PrimaryKeyConstraint('id'))
    op.create_index(op.f('ix_balances_id'), 'balances', ['id'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_balances_id'), table_name='balances')
    op.drop_table('balances')

<mask token>
revision = '0cca41f7deac'
down_revision = 'bff62620fe69'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('balances', sa.Column('id', sa.Integer(), nullable=
        False), sa.Column('account_id', sa.String(), nullable=False), sa.
        Column('available', sa.DECIMAL(precision=11, scale=2), nullable=
        False), sa.Column('current', sa.DECIMAL(precision=11, scale=2),
        nullable=False), sa.Column('limit', sa.DECIMAL(precision=11, scale=
        2), nullable=True), sa.Column('currency', sa.String(), nullable=
        False), sa.Column('timestamp', sa.DateTime(), nullable=False), sa.
        ForeignKeyConstraint(['account_id'], ['accounts.account_id']), sa.
        PrimaryKeyConstraint('id'))
    op.create_index(op.f('ix_balances_id'), 'balances', ['id'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_balances_id'), table_name='balances')
    op.drop_table('balances')

<mask token>
from alembic import op
import sqlalchemy as sa
revision = '0cca41f7deac'
down_revision = 'bff62620fe69'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table('balances', sa.Column('id', sa.Integer(), nullable=
        False), sa.Column('account_id', sa.String(), nullable=False), sa.
        Column('available', sa.DECIMAL(precision=11, scale=2), nullable=
        False), sa.Column('current', sa.DECIMAL(precision=11, scale=2),
        nullable=False), sa.Column('limit', sa.DECIMAL(precision=11, scale=
        2), nullable=True), sa.Column('currency', sa.String(), nullable=
        False), sa.Column('timestamp', sa.DateTime(), nullable=False), sa.
        ForeignKeyConstraint(['account_id'], ['accounts.account_id']), sa.
        PrimaryKeyConstraint('id'))
    op.create_index(op.f('ix_balances_id'), 'balances', ['id'], unique=False)


def downgrade():
    op.drop_index(op.f('ix_balances_id'), table_name='balances')
    op.drop_table('balances')

"""Add balance table

Revision ID: 0cca41f7deac
Revises: bff62620fe69
Create Date: 2020-10-19 19:09:45.864588

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '0cca41f7deac'
down_revision = 'bff62620fe69'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('balances',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('account_id', sa.String(), nullable=False),
    sa.Column('available', sa.DECIMAL(precision=11, scale=2), nullable=False),
    sa.Column('current', sa.DECIMAL(precision=11, scale=2), nullable=False),
    sa.Column('limit', sa.DECIMAL(precision=11, scale=2), nullable=True),
    sa.Column('currency', sa.String(), nullable=False),
    sa.Column('timestamp', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['account_id'], ['accounts.account_id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_balances_id'), 'balances', ['id'], unique=False)
    # ### end Alembic commands ###


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