Alteration need to be done in gkdb
-
Columns to Add
- In Invoice table add two columns (attachement, JSONB) and (attachementcount, Integer, default 0)
- In delchel table add two columns (attachement, JSONB) and (attachementcount, Integer, default 0)
- In stock table add one columns (stockdate, DateTime)
- In purchaseorder add three columns (creditperiod, Unicode Text), (taxstate, UnicodeText) and (togodown, Integer, foreignkey((godown.goid), ondelete="cascade")
-
Create new table
- New table name usergodown with flowing columns Column('ugid', Integer, primary_key=True), Column('goid',Integer, ForeignKey('godown.goid',ondelete='CASCADE')), Column('userid',Integer, ForeignKey('users.userid', ondelete='CASCADE')), Column('orgcode',Integer, ForeignKey('organisation.orgcode',ondelete="CASCADE"), nullable=False)
-
Update
- Change datatype of schedule columns from UnicodeText to JSONB in table purchaseorder
-
Delete Columns
- delete columns maxdate, datedelivery, deliveryplaceaddr, tax and productdetails in purchaseorder table