X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/e6697f33a18fa7df70586f3ff563aa7d0102e71f..cd5afcd8835e4c8e625aea2a0a2a2edf86bf5653:/sql/Pg-upgrade-2.1.1-2.1.2.sql?ds=inline

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 876c6af83..068ee2319 100644
--- a/sql/Pg-upgrade-2.1.1-2.1.2.sql
+++ b/sql/Pg-upgrade-2.1.1-2.1.2.sql
@@ -116,8 +116,10 @@ alter table vendor drop column creditlimitold;
 --New Fields for customer and vendor
 alter table vendor add column obsolete boolean;
 alter table vendor alter column obsolete set default 'false';
+update table vendor set obsolete='false';
 alter table customer add column obsolete boolean;
 alter table customer alter column obsolete set default 'false';
+update table customer set obsolete='false';
 alter table customer add column ustid varchar(12);
 alter table vendor add column ustid varchar(12);
 
@@ -222,7 +224,7 @@ CREATE TABLE "pricegroup" (
 
 CREATE TABLE "prices" (
   "parts_id" integer REFERENCES parts(id),
-  "pricegroup_id" integer REFERENCES pricegroup(id),
+  "pricegroup_id" integer,
   "price" numeric(15,5)
 );
 
@@ -251,4 +253,11 @@ alter table invoice add column transdate text;
 alter table invoice add column cusordnumber text;
 --
 
+--
+-- add unqiue constraint to project
+ALTER TABLE project ADD constraint project_projectnumber_key UNIQUE(projectnumber);
+--
+-- add column deliverydate to ar
+ALTER TABLE ar ADD COLUMN deliverydate date;
+
 update defaults set version = '2.1.2';
