Add tender_code for CORE equity import batch rows

This commit is contained in:
Lance Edgar 2023-09-16 15:48:35 -05:00
parent 8162821fbd
commit 15340dad6a
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# -*- coding: utf-8; -*-
"""add equity_import tender_code
Revision ID: f8df04546a59
Revises: d426a274f0c2
Create Date: 2023-09-16 15:38:25.569334
"""
# revision identifiers, used by Alembic.
revision = 'f8df04546a59'
down_revision = 'd426a274f0c2'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
import rattail.db.types
def upgrade():
# batch_corepos_equity_import_row
op.add_column('batch_corepos_equity_import_row', sa.Column('tender_code', sa.String(length=2), nullable=True))
def downgrade():
# batch_corepos_equity_import_row
op.drop_column('batch_corepos_equity_import_row', 'tender_code')

View file

@ -92,6 +92,7 @@ class CoreEquityImportBatchRow(model.BatchRowMixin, model.Base):
member_type_id = sa.Column(sa.Integer(), nullable=True)
payment_amount = sa.Column(sa.Numeric(precision=10, scale=2), nullable=True)
department_number = sa.Column(sa.Integer(), nullable=True)
tender_code = sa.Column(sa.String(length=2), nullable=True)
timestamp = sa.Column(sa.DateTime(), nullable=True)
corepos_equity_total = sa.Column(sa.Numeric(precision=10, scale=2), nullable=True)
rattail_equity_total = sa.Column(sa.Numeric(precision=10, scale=2), nullable=True)