Fremdschlüssel für Bearbeiter in gl einführen
authorG. Richardson <information@kivitendo-premium.de>
Tue, 12 Nov 2013 21:59:06 +0000 (22:59 +0100)
committerG. Richardson <information@kivitendo-premium.de>
Wed, 13 Nov 2013 11:33:05 +0000 (12:33 +0100)
SL/DB/MetaSetup/GLTransaction.pm
sql/Pg-upgrade2/gl_add_employee_foreign_key.sql [new file with mode: 0644]

index 33f7121..14f386a 100644 (file)
@@ -37,6 +37,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { department_id => 'id' },
   },
 
+  employee => {
+    class       => 'SL::DB::Employee',
+    key_columns => { employee_id => 'id' },
+  },
+
   storno_obj => {
     class       => 'SL::DB::GLTransaction',
     key_columns => { storno_id => 'id' },
diff --git a/sql/Pg-upgrade2/gl_add_employee_foreign_key.sql b/sql/Pg-upgrade2/gl_add_employee_foreign_key.sql
new file mode 100644 (file)
index 0000000..7d96a4d
--- /dev/null
@@ -0,0 +1,5 @@
+-- @tag: gl_add_employee_foreign_key
+-- @description: Dialogbuchungen mit Bearbeiter verknüpfen
+-- @depends: release_3_0_0
+-- @ignore: 0
+ALTER TABLE gl  ADD FOREIGN KEY (employee_id) REFERENCES employee(id);