3 id int DEFAULT nextval ( 'id' ),
5 transdate date DEFAULT current_date,
7 taxincluded bool DEFAULT FALSE,
13 invoice bool DEFAULT FALSE,
17 INSERT INTO newap (id, invnumber, transdate, vendor, amount, netamount, paid,
18 datepaid, duedate, invoice, ordnumber)
19 SELECT id, invnumber, transdate, vendor, amount, netamount, paid,
20 datepaid, duedate, invoice, ordnumber
24 ALTER TABLE newap RENAME TO ap;
27 id int DEFAULT nextval ( 'id' ),
29 transdate date DEFAULT current_date,
31 taxincluded bool DEFAULT FALSE,
37 invoice bool DEFAULT FALSE,
43 INSERT INTO newar (id, invnumber, transdate, customer, amount, netamount, paid,
44 datepaid, duedate, invoice, shippingpoint, terms, notes)
45 SELECT id, invnumber, transdate, customer, amount, netamount, paid,
46 datepaid, duedate, invoice, shippingpoint, terms, notes
50 ALTER TABLE newar RENAME TO ar;
52 CREATE TABLE newcustomer (
53 id int DEFAULT nextval ( 'id' ),
68 shiptoname varchar(35),
69 shiptoaddr1 varchar(35),
70 shiptoaddr2 varchar(35),
71 shiptoaddr3 varchar(35),
72 shiptocontact varchar(20),
73 shiptophone varchar(20),
74 shiptofax varchar(20),
77 INSERT INTO newcustomer (
78 id, name, addr1, addr2, addr3, contact, phone, fax, email, notes, ytd,
79 discount, creditlimit, terms, shiptoname, shiptoaddr1, shiptoaddr2,
80 shiptoaddr3, shiptocontact, shiptophone, shiptofax, shiptoemail )
81 SELECT id, name, addr1, addr2, addr3, contact, phone, fax, email, notes, ytd,
82 discount, creditlimit, terms, shiptoname, shiptoaddr1, shiptoaddr2,
83 shiptoaddr3, shiptocontact, shiptophone, shiptofax, shiptoemail
87 ALTER TABLE newcustomer RENAME TO customer;
89 CREATE TABLE customertax (
94 CREATE TABLE newdefaults (
101 nativecurr varchar(3),
102 weightunit varchar(5)
105 INSERT INTO newdefaults (
106 inventory_accno, income_accno, expense_accno, invnumber, ponumber)
107 SELECT inventory_accno, income_accno, expense_accno, invnumber, ponumber
111 ALTER TABLE newdefaults RENAME TO defaults;
112 UPDATE defaults SET yearend = '1/31', nativecurr = 'CAD', weightunit = 'kg';
114 CREATE TABLE partstax (
125 CREATE TABLE newvendor (
126 id int DEFAULT nextval ( 'id' ),
143 INSERT INTO newvendor (
144 id, name, addr1, addr2, addr3, contact, phone, fax, email, notes, ytd )
145 SELECT id, name, addr1, addr2, addr3, contact, phone, fax, email, notes, ytd
149 ALTER TABLE newvendor RENAME TO vendor;
151 CREATE TABLE vendortax (
156 ALTER TABLE chart RENAME TO oldchart;
159 id int DEFAULT nextval( 'id' ),
169 INSERT INTO chart SELECT * FROM oldchart;