From: G. Richardson Date: Tue, 12 Nov 2013 21:59:06 +0000 (+0100) Subject: Fremdschlüssel für Bearbeiter in gl einführen X-Git-Tag: release-3.1.0beta1~22^2~165 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1168e9c997382048dd721eb94a5e021ac9145432;p=kivitendo-erp.git Fremdschlüssel für Bearbeiter in gl einführen --- 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);