key_columns => { buchungsgruppen_id => 'id' },
},
+ expense_accno => {
+ class => 'SL::DB::Chart',
+ key_columns => { expense_accno_id => 'id' },
+ },
+
+ income_accno => {
+ class => 'SL::DB::Chart',
+ key_columns => { income_accno_id => 'id' },
+ },
+
+ inventory_accno => {
+ class => 'SL::DB::Chart',
+ key_columns => { inventory_accno_id => 'id' },
+ },
+
partsgroup => {
class => 'SL::DB::PartsGroup',
key_columns => { partsgroup_id => 'id' },
--- /dev/null
+-- @tag: parts_add_chart_foreign_keys
+-- @description: Warenkonten mit chart-Tabelle per Fremdschlüssel verknüpft.
+-- @depends: release_3_4_1
+-- @ignore: 0
+
+ALTER TABLE parts ADD FOREIGN KEY (income_accno_id) REFERENCES chart(id);
+ALTER TABLE parts ADD FOREIGN KEY (inventory_accno_id) REFERENCES chart(id);
+ALTER TABLE parts ADD FOREIGN KEY (expense_accno_id) REFERENCES chart(id);