X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/195883fdfd3b10f329036767f027baa6e7c402b9..9f0d85c2b00a0d3b7a92b63115801b2452846470:/sql/Pg-upgrade-2.1.1-2.1.2.sql

diff --git a/sql/Pg-upgrade-2.1.1-2.1.2.sql b/sql/Pg-upgrade-2.1.1-2.1.2.sql
index 6cfb12be7..5800d73c7 100644
--- a/sql/Pg-upgrade-2.1.1-2.1.2.sql
+++ b/sql/Pg-upgrade-2.1.1-2.1.2.sql
@@ -152,6 +152,22 @@ alter table ar alter invnumber set NOT NULL;
 alter table ap alter invnumber set NOT NULL;
 alter table oe alter ordnumber set NOT NULL;
 
+alter table gl alter id set NOT NULL;
+alter table chart alter id set NOT NULL;
+alter table parts alter id set NOT NULL;
+alter table invoice alter id set NOT NULL;
+alter table vendor alter id set NOT NULL;
+alter table customer alter id set NOT NULL;
+alter table contacts alter cp_id set NOT NULL;
+alter table ar alter id set NOT NULL;
+alter table ap alter id set NOT NULL;
+alter table oe alter id set NOT NULL;
+alter table employee alter id set NOT NULL;
+alter table warehouse alter id set NOT NULL;
+alter table business alter id set NOT NULL;
+alter table license alter id set NOT NULL;
+alter table orderitems alter id set NOT NULL;
+
 alter table gl add primary key (id);
 alter table chart add primary key (id);
 alter table parts add primary key (id);
@@ -219,5 +235,21 @@ ALTER TABLE invoice ADD column pricegroup_id integer;
 ALTER TABLE orderitems ADD column pricegroup_id integer;
 
 update defaults set version = '2.1.2', audittrail = 't';
+
+-- USTVA Update solve Bug 49 conributed by Andre Schubert
+update chart set pos_ustva='861' where accno='1771';
+update chart set pos_ustva='511' where accno='1775';
+update chart set pos_ustva='511' where pos_ustva='51r';
+update chart set pos_ustva='861' where pos_ustva='86r';
+update chart set pos_ustva='971' where pos_ustva='97r';
+update chart set pos_ustva='931' where pos_ustva='93r';
+
+-- add fields for ordnumber/transdate/cusordnumber in invoice/orderitems (r690 cleanup)
+alter table orderitems add column ordnumber text;
+alter table orderitems add column transdate text;
+alter table orderitems add column cusordnumber text;
+alter table invoice add column ordnumber text;
+alter table invoice add column transdate text;
+alter table invoice add column cusordnumber text;
 --
 
