X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44..53593baa211863fbf66540cf1bcc36c8fb37257f:/sql/Pg-upgrade2/time_recordings_articles.sql

diff --git a/sql/Pg-upgrade2/time_recordings_articles.sql b/sql/Pg-upgrade2/time_recordings_articles.sql
new file mode 100644
index 000000000..c693c3699
--- /dev/null
+++ b/sql/Pg-upgrade2/time_recordings_articles.sql
@@ -0,0 +1,13 @@
+-- @tag: time_recordings_articles
+-- @description: Zeiterfassungs-Artikel
+-- @depends: time_recordings
+
+CREATE TABLE time_recording_articles (
+  id                 SERIAL,
+  part_id            INTEGER  REFERENCES parts(id) UNIQUE NOT NULL,
+  position           INTEGER  NOT NULL,
+
+  PRIMARY KEY (id)
+);
+
+ALTER TABLE time_recordings ADD COLUMN part_id INTEGER REFERENCES parts(id);
