X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6061749dc0ece2873ef61a0c14af1b8a9e46034a..d1bffbc141ae931caf359090c6b7ec56a4feccd1:/sql/Pg-upgrade2/add_chart_link_to_acc_trans.sql

diff --git a/sql/Pg-upgrade2/add_chart_link_to_acc_trans.sql b/sql/Pg-upgrade2/add_chart_link_to_acc_trans.sql
index 4eb187ff9..78696ef94 100644
--- a/sql/Pg-upgrade2/add_chart_link_to_acc_trans.sql
+++ b/sql/Pg-upgrade2/add_chart_link_to_acc_trans.sql
@@ -1,12 +1,18 @@
 -- @tag: add_chart_link_to_acc_trans
 -- @description: Neue Spalte chart_link in der acc_trans
--- @depends: release_3_0_0 
+-- @depends: release_3_0_0 acc_trans_constraints
 
---neue Spalte hinzufÃ¼gen:
+--Spalte link in der chart updaten:
+UPDATE chart SET link = '' WHERE link IS NULL;
+
+--chart.link als Pflichtfeld definieren:
+ALTER TABLE chart ALTER link SET NOT NULL;
+
+--neue Spalte chart_link zur acc_trans hinzufÃ¼gen:
 ALTER TABLE acc_trans ADD COLUMN chart_link text;
 
 --Spalte mit Werten fÃ¼llen:
 UPDATE acc_trans SET chart_link = (SELECT link FROM chart WHERE id=chart_id);
 
---Spalte als Pflichtfeld definieren:
+--Spalte acc_trans.chart_link als Pflichtfeld definieren:
 ALTER TABLE acc_trans ALTER chart_link SET NOT NULL;
