From d30073296f5309bd24ef6225e18977fd711a26b8 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Thu, 6 Aug 2015 16:50:11 +0200 Subject: [PATCH] =?utf8?q?Auftr=C3=A4ge=20immer=20mit=20Projektnummer=20sp?= =?utf8?q?eichern.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Feature kann in der Mandantenkonfiguration aktiviert werden. --- SL/DB/MetaSetup/Default.pm | 13 +++++++++++++ sql/Pg-upgrade2/project_defaults.sql | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 sql/Pg-upgrade2/project_defaults.sql diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 821ed98fe..8b8dbe5e7 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -69,6 +69,7 @@ __PACKAGE__->meta->columns( mtime => { type => 'timestamp' }, normalize_part_descriptions => { type => 'boolean', default => 'true' }, normalize_vc_names => { type => 'boolean', default => 'true' }, + order_always_project => { type => 'boolean', default => 'false' }, parts_image_css => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' }, parts_listing_image => { type => 'boolean', default => 'true' }, parts_show_image => { type => 'boolean', default => 'true' }, @@ -76,6 +77,8 @@ __PACKAGE__->meta->columns( pdonumber => { type => 'text' }, ponumber => { type => 'text' }, profit_determination => { type => 'text' }, + project_status_id => { type => 'integer' }, + project_type_id => { type => 'integer' }, purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' }, purchase_order_show_delete => { type => 'boolean', default => 'true' }, reqdate_interval => { type => 'integer', default => '0' }, @@ -132,6 +135,16 @@ __PACKAGE__->meta->foreign_keys( key_columns => { currency_id => 'id' }, }, + project_status => { + class => 'SL::DB::ProjectStatus', + key_columns => { project_status_id => 'id' }, + }, + + project_type => { + class => 'SL::DB::ProjectType', + key_columns => { project_type_id => 'id' }, + }, + requirement_spec_section_order_part => { class => 'SL::DB::Part', key_columns => { requirement_spec_section_order_part_id => 'id' }, diff --git a/sql/Pg-upgrade2/project_defaults.sql b/sql/Pg-upgrade2/project_defaults.sql new file mode 100644 index 000000000..1d65dc73c --- /dev/null +++ b/sql/Pg-upgrade2/project_defaults.sql @@ -0,0 +1,9 @@ +-- @tag: add_project_defaults +-- @description: Standardprojekttyp und Standardprojectstatus +-- @depends: release_3_2_0 +ALTER TABLE defaults ADD COLUMN order_always_project boolean DEFAULT false; +ALTER TABLE defaults ADD COLUMN project_status_id integer; +ALTER TABLE defaults ADD COLUMN project_type_id integer; +ALTER TABLE defaults ADD FOREIGN KEY (project_status_id) REFERENCES project_statuses (id); +ALTER TABLE defaults ADD FOREIGN KEY (project_type_id) REFERENCES project_types (id); + -- 2.20.1