Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>
Add migration to add reserved to balances
src/alembic/versions/d6a05e473bc9_add_reserved_to_balances.py | 28 +++++
diff --git a/src/alembic/versions/d6a05e473bc9_add_reserved_to_balances.py b/src/alembic/versions/d6a05e473bc9_add_reserved_to_balances.py new file mode 100644 index 0000000000000000000000000000000000000000..5f3a1623e29df41d8f52791bbbfcba1bccefb34e --- /dev/null +++ b/src/alembic/versions/d6a05e473bc9_add_reserved_to_balances.py @@ -0,0 +1,28 @@ +"""add reserved to balances + +Revision ID: d6a05e473bc9 +Revises: +Create Date: 2019-12-03 22:08:20.571234 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy import Column +from sqlalchemy.types import DECIMAL + + +# revision identifiers, used by Alembic. +revision = 'd6a05e473bc9' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column('balances', + Column('reserved', DECIMAL(10, 2), nullable = False, default = 0) + ) + + +def downgrade(): + op.drop_column('balances', 'reserved')