Zeiterfassung: Fremdschlüssel für Auftrag: DB-Upgrade und Rose
[kivitendo-erp.git] / SL / DB / MetaSetup / TimeRecording.pm
index 0ab79a5..a500131 100644 (file)
@@ -19,6 +19,7 @@ __PACKAGE__->meta->columns(
   id              => { type => 'serial', not_null => 1 },
   itime           => { type => 'timestamp', default => 'now()', not_null => 1 },
   mtime           => { type => 'timestamp', default => 'now()', not_null => 1 },
+  order_id        => { type => 'integer' },
   part_id         => { type => 'integer' },
   payroll         => { type => 'boolean', default => 'false' },
   project_id      => { type => 'integer' },
@@ -41,6 +42,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { employee_id => 'id' },
   },
 
+  order => {
+    class       => 'SL::DB::Order',
+    key_columns => { order_id => 'id' },
+  },
+
   part => {
     class       => 'SL::DB::Part',
     key_columns => { part_id => 'id' },