From 26b288f1ba8fc44c0ef9f2a30a24a854e106d6f2 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 20 Feb 2007 14:53:31 +0000 Subject: [PATCH] Anpassung der Tabelle "status", um in ihr die Historie zu speichern. --- sql/Pg-upgrade2/status_history.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sql/Pg-upgrade2/status_history.sql 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; -- 2.20.1