Add "total amount" to CLINS
- includes migration for change to model
This commit is contained in:
29
alembic/versions/f03333c42bdb_add_total_amount_to_clins.py
Normal file
29
alembic/versions/f03333c42bdb_add_total_amount_to_clins.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Add total amount to CLINs
|
||||
|
||||
Revision ID: f03333c42bdb
|
||||
Revises: 4a3122ffe898
|
||||
Create Date: 2019-09-04 15:35:39.446486
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'f03333c42bdb' # pragma: allowlist secret
|
||||
down_revision = '30ea1cb20807' # pragma: allowlist secret
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('clins', sa.Column('total_amount', sa.Numeric(scale=2), nullable=True))
|
||||
op.execute("UPDATE clins SET total_amount = 0")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('clins', 'total_amount')
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user