Add vendor_item_code field to purchase credit records

This commit is contained in:
Lance Edgar 2018-03-01 15:16:11 -06:00
parent aaad1d328f
commit 21b71cabfe
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
"""add credit.vendor_item_code
Revision ID: 90a3338b187b
Revises: af4c4ec011fb
Create Date: 2018-03-01 11:23:19.029547
"""
from __future__ import unicode_literals, absolute_import
# revision identifiers, used by Alembic.
revision = '90a3338b187b'
down_revision = u'af4c4ec011fb'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
import rattail.db.types
def upgrade():
# purchase_batch_credit
op.add_column('purchase_batch_credit', sa.Column('vendor_item_code', sa.String(length=20), nullable=True))
# purchase_credit
op.add_column('purchase_credit', sa.Column('vendor_item_code', sa.String(length=20), nullable=True))
def downgrade():
# purchase_credit
op.drop_column('purchase_credit', 'vendor_item_code')
# purchase_batch_credit
op.drop_column('purchase_batch_credit', 'vendor_item_code')

View file

@ -355,6 +355,10 @@ class PurchaseCreditBase(object):
Product UPC for the credit item. Product UPC for the credit item.
""") """)
vendor_item_code = sa.Column(sa.String(length=20), nullable=True, doc="""
Vendor-specific code for the credit item.
""")
brand_name = sa.Column(sa.String(length=100), nullable=True, doc=""" brand_name = sa.Column(sa.String(length=100), nullable=True, doc="""
Brand name for the credit item. Brand name for the credit item.
""") """)