From 0fdf58910b8cd0b54e3d2213a27dab2ffe149bfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 29 Nov 2017 13:15:50 +0100 Subject: [PATCH] =?utf8?q?Inventur:=20Voreinstellungen=20f=C3=BCr=20Lager,?= =?utf8?q?=20Lagerplatz=20und=20Stichtag=20(DB=20und=20Rose)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/MetaSetup/Default.pm | 13 +++++++++++++ ...stocktaking_preselects_client_config_default.sql | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 sql/Pg-upgrade2/add_stocktaking_preselects_client_config_default.sql diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index ea81e3504..b6a3af539 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -136,6 +136,9 @@ __PACKAGE__->meta->columns( signature => { type => 'text' }, sonumber => { type => 'text' }, sqnumber => { type => 'text' }, + stocktaking_bin_id => { type => 'integer' }, + stocktaking_cutoff_date => { type => 'date' }, + stocktaking_warehouse_id => { type => 'integer' }, taxnumber => { type => 'text' }, templates => { type => 'text' }, transfer_default => { type => 'boolean', default => 'true' }, @@ -199,6 +202,16 @@ __PACKAGE__->meta->foreign_keys( key_columns => { requirement_spec_section_order_part_id => 'id' }, }, + stocktaking_bin => { + class => 'SL::DB::Bin', + key_columns => { stocktaking_bin_id => 'id' }, + }, + + stocktaking_warehouse => { + class => 'SL::DB::Warehouse', + key_columns => { stocktaking_warehouse_id => 'id' }, + }, + warehouse => { class => 'SL::DB::Warehouse', key_columns => { warehouse_id => 'id' }, diff --git a/sql/Pg-upgrade2/add_stocktaking_preselects_client_config_default.sql b/sql/Pg-upgrade2/add_stocktaking_preselects_client_config_default.sql new file mode 100644 index 000000000..1ec1e5603 --- /dev/null +++ b/sql/Pg-upgrade2/add_stocktaking_preselects_client_config_default.sql @@ -0,0 +1,6 @@ +-- @tag: add_stocktaking_preselects_client_config_default +-- @description: Konfigurations-Optionen für Vorbelegungen zur Inventur +-- @depends: warehouse +ALTER TABLE defaults ADD COLUMN stocktaking_warehouse_id INTEGER REFERENCES warehouse(id); +ALTER TABLE defaults ADD COLUMN stocktaking_bin_id INTEGER REFERENCES bin(id); +ALTER TABLE defaults ADD COLUMN stocktaking_cutoff_date DATE; -- 2.20.1