1 -- @tag: add_chart_link_to_acc_trans
 
   2 -- @description: Neue Spalte chart_link in der acc_trans
 
   3 -- @depends: release_3_0_0 acc_trans_constraints
 
   5 --Spalte link in der chart updaten:
 
   6 UPDATE chart SET link = '' WHERE link IS NULL;
 
   8 --chart.link als Pflichtfeld definieren:
 
   9 ALTER TABLE chart ALTER link SET NOT NULL;
 
  11 --neue Spalte chart_link zur acc_trans hinzufügen:
 
  12 ALTER TABLE acc_trans ADD COLUMN chart_link text;
 
  14 --Spalte mit Werten füllen:
 
  15 UPDATE acc_trans SET chart_link = (SELECT link FROM chart WHERE id=chart_id);
 
  17 --Spalte acc_trans.chart_link als Pflichtfeld definieren:
 
  18 ALTER TABLE acc_trans ALTER chart_link SET NOT NULL;