ref: legacy
src/alembic/versions/1a8c88c6e1e4_add_margin_to_cycle.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
"""add margin to cycle Revision ID: 1a8c88c6e1e4 Revises: b1a2b379ee3d Create Date: 2019-12-26 21:36:46.996515 """ from alembic import op from alembic import op import sqlalchemy as sa from sqlalchemy import Column from sqlalchemy.types import DECIMAL # revision identifiers, used by Alembic. branch_labels = None revision = '1a8c88c6e1e4' down_revision = 'b1a2b379ee3d' depends_on = None def upgrade(): op.add_column('cycles', Column('price_margin', DECIMAL(10, 2), nullable = False, default = 0) ) def downgrade(): op.drop_column('cycles', 'price_margin') import sqlalchemy as sa |