Commit fd3b779a authored by Prajkta_Patkar's avatar Prajkta_Patkar
Browse files

added alter statement for UNIQUECONSTRAINT in gkupgrade

parent 35772cfa
......@@ -23,6 +23,7 @@ Contributors:
"Krishnakant Mane" <kk@gmail.com>
"Ishan Masdekar " <imasdekar@dff.org.in>
"Navin Karkera" <navin@dff.org.in>
'Prajkta Patkar'<prajkta@dff.org.in>
"""
from pyramid.view import view_defaults, view_config
......@@ -76,6 +77,7 @@ class api_organisation(object):
self.con.execute(select(gkdb.organisation.c.billflag))
self.con.execute(select([func.count(gkdb.billwise.c.billid)]))
except:
self.con.execute("alter table customerandsupplier add UNIQUE(orgcode,gstin)")
self.con.execute("alter table invoice add discount numeric(5,2) default 0.00, add taxflag integer default 22, add reversecharge text, add bankdetails jsonb,add transportationmode text,add vehicleno text,add dateofsupply timestamp")
self.con.execute("alter table delchal drop column issuerid")
self.con.execute("ALTER TABLE delchal DROP CONSTRAINT delchal_custid_fkey, ADD CONSTRAINT delchal_custid_fkey FOREIGN KEY (custid) REFERENCES customerandsupplier(custid)")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment