From 1168e9c997382048dd721eb94a5e021ac9145432 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 12 Nov 2013 22:59:06 +0100 Subject: [PATCH] =?utf8?q?Fremdschl=C3=BCssel=20f=C3=BCr=20Bearbeiter=20in?= =?utf8?q?=20gl=20einf=C3=BChren?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/MetaSetup/GLTransaction.pm | 5 +++++ sql/Pg-upgrade2/gl_add_employee_foreign_key.sql | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 sql/Pg-upgrade2/gl_add_employee_foreign_key.sql diff --git a/SL/DB/MetaSetup/GLTransaction.pm b/SL/DB/MetaSetup/GLTransaction.pm index 33f7121fd..14f386a7a 100644 --- a/SL/DB/MetaSetup/GLTransaction.pm +++ b/SL/DB/MetaSetup/GLTransaction.pm @@ -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 index 000000000..7d96a4d55 --- /dev/null +++ b/sql/Pg-upgrade2/gl_add_employee_foreign_key.sql @@ -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); -- 2.20.1