From: Moritz Bunkus Date: Tue, 20 Feb 2007 14:53:31 +0000 (+0000) Subject: Anpassung der Tabelle "status", um in ihr die Historie zu speichern. X-Git-Tag: release-2.4.2~49 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=26b288f1ba8fc44c0ef9f2a30a24a854e106d6f2;p=kivitendo-erp.git Anpassung der Tabelle "status", um in ihr die Historie zu speichern. --- diff --git a/sql/Pg-upgrade2/status_history.sql b/sql/Pg-upgrade2/status_history.sql new file mode 100644 index 000000000..0ebc4d3d1 --- /dev/null +++ b/sql/Pg-upgrade2/status_history.sql @@ -0,0 +1,13 @@ +-- @tag: status_history +-- @description: Spalten in Tabelle status zum Speichern der history +-- @depends: release_2_4_1 +ALTER TABLE status ADD COLUMN id integer; +UPDATE status SET id = nextval('id'); +ALTER TABLE status ALTER COLUMN id SET DEFAULT nextval('id'); +ALTER TABLE status ALTER COLUMN id SET NOT NULL; + +ALTER TABLE status ADD COLUMN employee_id integer; +ALTER TABLE status ADD FOREIGN KEY (employee_id) REFERENCES employee(id); + +ALTER TABLE status ADD COLUMN addition text; +ALTER TABLE status ADD COLUMN what_done text;