projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reste der Tabellen "rma" und "rmaitems" entfernt
[kivitendo-erp.git]
/
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
4eb187f
..
78696ef
100644
(file)
--- 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
-- @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);
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 a
cc_trans.chart_link a
ls Pflichtfeld definieren:
ALTER TABLE acc_trans ALTER chart_link SET NOT NULL;
ALTER TABLE acc_trans ALTER chart_link SET NOT NULL;