chart_link in acc_trans
[kivitendo-erp.git] / sql / Pg-upgrade2 / add_chart_link_to_acc_trans.sql
1 -- @tag: add_chart_link_to_acc_trans
2 -- @description: Neue Spalte chart_link in der acc_trans
3 -- @depends: release_3_0_0 
4
5 --neue Spalte hinzufügen:
6 ALTER TABLE acc_trans ADD COLUMN chart_link text;
7
8 --Spalte mit Werten füllen:
9 UPDATE acc_trans SET chart_link = (SELECT link FROM chart WHERE id=chart_id);
10
11 --Spalte als Pflichtfeld definieren:
12 ALTER TABLE acc_trans ALTER chart_link SET NOT NULL;