allow_inline_column_values => 1,
foreign_keys => [
+ customer => {
+ class => 'SL::DB::Customer',
+ key_columns => { customer_id => 'id' },
+ },
+
employee => {
class => 'SL::DB::Employee',
key_columns => { employee_id => 'id' },
class => 'SL::DB::Employee',
key_columns => { salesman_id => 'id' },
},
+
+ vendor => {
+ class => 'SL::DB::Vendor',
+ key_columns => { vendor_id => 'id' },
+ },
],
);
--- /dev/null
+-- @tag: oe_customer_vendor_fkeys
+-- @encoding: utf-8
+-- @description: Foreign Keys für customer und vendor in oe
+-- @depends: release_2_6_3
+-- @timestamp: 1317380460
+UPDATE oe SET customer_id = NULL WHERE customer_id = 0;
+UPDATE oe SET vendor_id = NULL WHERE vendor_id = 0;
+
+
+ALTER TABLE oe ADD FOREIGN KEY (customer_id) REFERENCES customer(id);
+ALTER TABLE oe ADD FOREIGN KEY (vendor_id) REFERENCES vendor(id);