From: Moritz Bunkus Date: Mon, 1 Jul 2013 15:21:12 +0000 (+0200) Subject: Rose-Setup Pflichtenhefte/Projekte an Umstellung setup()/initialize() angepasst X-Git-Tag: release-3.2.0beta~467^2~150 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1561b7f3d98390ba97bd5a81945f16e82d96915b;p=kivitendo-erp.git Rose-Setup Pflichtenhefte/Projekte an Umstellung setup()/initialize() angepasst --- diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index c1deb9c34..435fd2729 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -66,8 +66,8 @@ __PACKAGE__->meta->columns( profit_determination => { type => 'text' }, purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' }, purchase_order_show_delete => { type => 'boolean', default => 'true' }, - requirement_spec_section_number_format => { type => 'text', default => 'A00', not_null => 1 }, requirement_spec_function_block_number_format => { type => 'text', default => 'FB000', not_null => 1 }, + requirement_spec_section_number_format => { type => 'text', default => 'A00', not_null => 1 }, revtrans => { type => 'boolean', default => 'false' }, rfqnumber => { type => 'text' }, rmanumber => { type => 'text' }, diff --git a/SL/DB/MetaSetup/Project.pm b/SL/DB/MetaSetup/Project.pm index 135d7c8db..5b9926589 100644 --- a/SL/DB/MetaSetup/Project.pm +++ b/SL/DB/MetaSetup/Project.pm @@ -25,7 +25,6 @@ __PACKAGE__->meta->columns( projectnumber => { type => 'text' }, start_date => { type => 'date' }, timeframe => { type => 'boolean', default => 'false', not_null => 1 }, - type => { type => 'text' }, valid => { type => 'boolean', default => 'true' }, ); @@ -36,16 +35,6 @@ __PACKAGE__->meta->unique_keys([ 'projectnumber' ]); __PACKAGE__->meta->allow_inline_column_values(1); __PACKAGE__->meta->foreign_keys( - customer => { - class => 'SL::DB::Customer', - key_columns => { customer_id => 'id' }, - }, - - project_type => { - class => 'SL::DB::ProjectType', - key_columns => { project_type_id => 'id' }, - }, - billable_customer => { class => 'SL::DB::Customer', key_columns => { billable_customer_id => 'id' }, diff --git a/SL/DB/MetaSetup/ProjectParticipant.pm b/SL/DB/MetaSetup/ProjectParticipant.pm index b58a66302..0f99ce6fd 100644 --- a/SL/DB/MetaSetup/ProjectParticipant.pm +++ b/SL/DB/MetaSetup/ProjectParticipant.pm @@ -6,38 +6,36 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'project_participants', - - columns => [ - id => { type => 'serial', not_null => 1 }, - project_id => { type => 'integer', not_null => 1 }, - employee_id => { type => 'integer', not_null => 1 }, - project_role_id => { type => 'integer', not_null => 1 }, - minutes => { type => 'integer', default => '0', not_null => 1 }, - cost_per_hour => { type => 'numeric', precision => 5, scale => 15 }, - itime => { type => 'timestamp', default => '06.05.2013 14:26:18.81159' }, - mtime => { type => 'timestamp' }, - ], - - primary_key_columns => [ 'id' ], - - foreign_keys => [ - employee => { - class => 'SL::DB::Employee', - key_columns => { employee_id => 'id' }, - }, - - project => { - class => 'SL::DB::Project', - key_columns => { project_id => 'id' }, - }, - - project_role => { - class => 'SL::DB::ProjectRole', - key_columns => { project_role_id => 'id' }, - }, - ], +__PACKAGE__->meta->table('project_participants'); + +__PACKAGE__->meta->columns( + cost_per_hour => { type => 'numeric', precision => 5, scale => 15 }, + employee_id => { type => 'integer', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' }, + minutes => { type => 'integer', default => '0', not_null => 1 }, + mtime => { type => 'timestamp' }, + project_id => { type => 'integer', not_null => 1 }, + project_role_id => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->foreign_keys( + employee => { + class => 'SL::DB::Employee', + key_columns => { employee_id => 'id' }, + }, + + project => { + class => 'SL::DB::Project', + key_columns => { project_id => 'id' }, + }, + + project_role => { + class => 'SL::DB::ProjectRole', + key_columns => { project_role_id => 'id' }, + }, ); 1; diff --git a/SL/DB/MetaSetup/ProjectPhase.pm b/SL/DB/MetaSetup/ProjectPhase.pm new file mode 100644 index 000000000..c39fcea3b --- /dev/null +++ b/SL/DB/MetaSetup/ProjectPhase.pm @@ -0,0 +1,44 @@ +# This file has been auto-generated. Do not modify it; it will be overwritten +# by rose_auto_create_model.pl automatically. +package SL::DB::ProjectPhase; + +use strict; + +use base qw(SL::DB::Object); + +__PACKAGE__->meta->table('project_phases'); + +__PACKAGE__->meta->columns( + budget_cost => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 }, + budget_minutes => { type => 'integer', default => '0', not_null => 1 }, + description => { type => 'text', not_null => 1 }, + end_date => { type => 'date' }, + general_cost_per_hour => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 }, + general_minutes => { type => 'integer', default => '0', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' }, + mtime => { type => 'timestamp' }, + name => { type => 'text', not_null => 1 }, + project_id => { type => 'integer' }, + start_date => { type => 'date' }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->foreign_keys( + project => { + class => 'SL::DB::Project', + key_columns => { project_id => 'id' }, + }, +); + +__PACKAGE__->meta->relationships( + project_phase_participants => { + class => 'SL::DB::ProjectPhaseParticipant', + column_map => { id => 'project_phase_id' }, + type => 'one to many', + }, +); + +1; +; diff --git a/SL/DB/MetaSetup/ProjectPhaseParticipant.pm b/SL/DB/MetaSetup/ProjectPhaseParticipant.pm index be9749542..169181f7d 100644 --- a/SL/DB/MetaSetup/ProjectPhaseParticipant.pm +++ b/SL/DB/MetaSetup/ProjectPhaseParticipant.pm @@ -6,33 +6,31 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'project_phase_participants', - - columns => [ - id => { type => 'serial', not_null => 1 }, - project_phase_id => { type => 'integer', not_null => 1 }, - employee_id => { type => 'integer', not_null => 1 }, - project_role_id => { type => 'integer', not_null => 1 }, - minutes => { type => 'integer', default => '0', not_null => 1 }, - cost_per_hour => { type => 'numeric', precision => 5, scale => 15 }, - itime => { type => 'timestamp', default => '06.05.2013 14:26:18.81159' }, - mtime => { type => 'timestamp' }, - ], - - primary_key_columns => [ 'id' ], - - foreign_keys => [ - employee => { - class => 'SL::DB::Employee', - key_columns => { employee_id => 'id' }, - }, - - project_role => { - class => 'SL::DB::ProjectRole', - key_columns => { project_role_id => 'id' }, - }, - ], +__PACKAGE__->meta->table('project_phase_participants'); + +__PACKAGE__->meta->columns( + cost_per_hour => { type => 'numeric', precision => 5, scale => 15 }, + employee_id => { type => 'integer', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' }, + minutes => { type => 'integer', default => '0', not_null => 1 }, + mtime => { type => 'timestamp' }, + project_phase_id => { type => 'integer', not_null => 1 }, + project_role_id => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->foreign_keys( + employee => { + class => 'SL::DB::Employee', + key_columns => { employee_id => 'id' }, + }, + + project_role => { + class => 'SL::DB::ProjectRole', + key_columns => { project_role_id => 'id' }, + }, ); 1; diff --git a/SL/DB/MetaSetup/ProjectRole.pm b/SL/DB/MetaSetup/ProjectRole.pm index f9476a033..82385d3f5 100644 --- a/SL/DB/MetaSetup/ProjectRole.pm +++ b/SL/DB/MetaSetup/ProjectRole.pm @@ -6,20 +6,18 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'project_roles', +__PACKAGE__->meta->table('project_roles'); - columns => [ - id => { type => 'serial', not_null => 1 }, - name => { type => 'text', not_null => 1 }, - description => { type => 'text', not_null => 1 }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => '06.05.2013 14:26:18.81159' }, - mtime => { type => 'timestamp' }, - ], - - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->columns( + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' }, + mtime => { type => 'timestamp' }, + name => { type => 'text', not_null => 1 }, + position => { type => 'integer', not_null => 1 }, ); +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + 1; ; diff --git a/SL/DB/MetaSetup/ProjectStatus.pm b/SL/DB/MetaSetup/ProjectStatus.pm index 262955c8f..be98f7b53 100644 --- a/SL/DB/MetaSetup/ProjectStatus.pm +++ b/SL/DB/MetaSetup/ProjectStatus.pm @@ -6,20 +6,18 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'project_status', +__PACKAGE__->meta->table('project_status'); - columns => [ - id => { type => 'serial', not_null => 1 }, - name => { type => 'text', not_null => 1 }, - description => { type => 'text', not_null => 1 }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => '06.05.2013 14:26:18.81159' }, - mtime => { type => 'timestamp' }, - ], - - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->columns( + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' }, + mtime => { type => 'timestamp' }, + name => { type => 'text', not_null => 1 }, + position => { type => 'integer', not_null => 1 }, ); +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + 1; ; diff --git a/SL/DB/MetaSetup/RequirementSpec.pm b/SL/DB/MetaSetup/RequirementSpec.pm index a6a2c4f04..a08ee183a 100644 --- a/SL/DB/MetaSetup/RequirementSpec.pm +++ b/SL/DB/MetaSetup/RequirementSpec.pm @@ -6,62 +6,60 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_specs', +__PACKAGE__->meta->table('requirement_specs'); - columns => [ - id => { type => 'serial', not_null => 1 }, - type_id => { type => 'integer' }, - status_id => { type => 'integer' }, - version_id => { type => 'integer' }, - customer_id => { type => 'integer' }, - project_id => { type => 'integer' }, - title => { type => 'text', not_null => 1 }, - hourly_rate => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 8 }, - net_sum => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, - working_copy_id => { type => 'integer' }, - previous_section_number => { type => 'integer', not_null => 1 }, - previous_fb_number => { type => 'integer', not_null => 1 }, - is_template => { type => 'boolean', default => 'false' }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->columns( + customer_id => { type => 'integer' }, + hourly_rate => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 8 }, + id => { type => 'serial', not_null => 1 }, + is_template => { type => 'boolean', default => 'false' }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + net_sum => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, + previous_fb_number => { type => 'integer', not_null => 1 }, + previous_section_number => { type => 'integer', not_null => 1 }, + project_id => { type => 'integer' }, + status_id => { type => 'integer' }, + title => { type => 'text', not_null => 1 }, + type_id => { type => 'integer' }, + version_id => { type => 'integer' }, + working_copy_id => { type => 'integer' }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - allow_inline_column_values => 1, +__PACKAGE__->meta->allow_inline_column_values(1); - foreign_keys => [ - customer => { - class => 'SL::DB::Customer', - key_columns => { customer_id => 'id' }, - }, +__PACKAGE__->meta->foreign_keys( + customer => { + class => 'SL::DB::Customer', + key_columns => { customer_id => 'id' }, + }, - project => { - class => 'SL::DB::Project', - key_columns => { project_id => 'id' }, - }, + project => { + class => 'SL::DB::Project', + key_columns => { project_id => 'id' }, + }, - status => { - class => 'SL::DB::RequirementSpecStatus', - key_columns => { status_id => 'id' }, - }, + status => { + class => 'SL::DB::RequirementSpecStatus', + key_columns => { status_id => 'id' }, + }, - type => { - class => 'SL::DB::RequirementSpecType', - key_columns => { type_id => 'id' }, - }, + type => { + class => 'SL::DB::RequirementSpecType', + key_columns => { type_id => 'id' }, + }, - version => { - class => 'SL::DB::RequirementSpecVersion', - key_columns => { version_id => 'id' }, - }, + version => { + class => 'SL::DB::RequirementSpecVersion', + key_columns => { version_id => 'id' }, + }, - working_copy => { - class => 'SL::DB::RequirementSpec', - key_columns => { working_copy_id => 'id' }, - }, - ], + working_copy => { + class => 'SL::DB::RequirementSpec', + key_columns => { working_copy_id => 'id' }, + }, ); 1; diff --git a/SL/DB/MetaSetup/RequirementSpecAcceptanceStatus.pm b/SL/DB/MetaSetup/RequirementSpecAcceptanceStatus.pm index 96d2d0b51..67ec1c6d1 100644 --- a/SL/DB/MetaSetup/RequirementSpecAcceptanceStatus.pm +++ b/SL/DB/MetaSetup/RequirementSpecAcceptanceStatus.pm @@ -6,24 +6,22 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_acceptance_statuses', - - columns => [ - id => { type => 'serial', not_null => 1 }, - name => { type => 'text', not_null => 1 }, - description => { type => 'text' }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->table('requirement_spec_acceptance_statuses'); + +__PACKAGE__->meta->columns( + description => { type => 'text' }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + name => { type => 'text', not_null => 1 }, + position => { type => 'integer', not_null => 1 }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - unique_key => [ 'name', 'description' ], +__PACKAGE__->meta->unique_keys([ 'name', 'description' ]); - allow_inline_column_values => 1, -); +__PACKAGE__->meta->allow_inline_column_values(1); 1; ; diff --git a/SL/DB/MetaSetup/RequirementSpecComplexity.pm b/SL/DB/MetaSetup/RequirementSpecComplexity.pm index 60be04003..a49773239 100644 --- a/SL/DB/MetaSetup/RequirementSpecComplexity.pm +++ b/SL/DB/MetaSetup/RequirementSpecComplexity.pm @@ -6,23 +6,21 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_complexities', - - columns => [ - id => { type => 'serial', not_null => 1 }, - description => { type => 'text', not_null => 1 }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->table('requirement_spec_complexities'); + +__PACKAGE__->meta->columns( + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + position => { type => 'integer', not_null => 1 }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - unique_key => [ 'description' ], +__PACKAGE__->meta->unique_keys([ 'description' ]); - allow_inline_column_values => 1, -); +__PACKAGE__->meta->allow_inline_column_values(1); 1; ; diff --git a/SL/DB/MetaSetup/RequirementSpecDependency.pm b/SL/DB/MetaSetup/RequirementSpecDependency.pm index 4f9eae569..d453d2534 100644 --- a/SL/DB/MetaSetup/RequirementSpecDependency.pm +++ b/SL/DB/MetaSetup/RequirementSpecDependency.pm @@ -6,27 +6,25 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_item_dependencies', - - columns => [ - depending_item_id => { type => 'integer', not_null => 1 }, - depended_item_id => { type => 'integer', not_null => 1 }, - ], - - primary_key_columns => [ 'depending_item_id', 'depended_item_id' ], - - foreign_keys => [ - depended_item => { - class => 'SL::DB::RequirementSpecItem', - key_columns => { depended_item_id => 'id' }, - }, - - depending_item => { - class => 'SL::DB::RequirementSpecItem', - key_columns => { depending_item_id => 'id' }, - }, - ], +__PACKAGE__->meta->table('requirement_spec_item_dependencies'); + +__PACKAGE__->meta->columns( + depended_item_id => { type => 'integer', not_null => 1 }, + depending_item_id => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'depending_item_id', 'depended_item_id' ]); + +__PACKAGE__->meta->foreign_keys( + depended_item => { + class => 'SL::DB::RequirementSpecItem', + key_columns => { depended_item_id => 'id' }, + }, + + depending_item => { + class => 'SL::DB::RequirementSpecItem', + key_columns => { depending_item_id => 'id' }, + }, ); 1; diff --git a/SL/DB/MetaSetup/RequirementSpecItem.pm b/SL/DB/MetaSetup/RequirementSpecItem.pm index 62f9bcca7..ba2d4cbb1 100644 --- a/SL/DB/MetaSetup/RequirementSpecItem.pm +++ b/SL/DB/MetaSetup/RequirementSpecItem.pm @@ -6,59 +6,57 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_items', - - columns => [ - id => { type => 'serial', not_null => 1 }, - requirement_spec_id => { type => 'integer', not_null => 1 }, - item_type => { type => 'text', not_null => 1 }, - parent_id => { type => 'integer' }, - position => { type => 'integer', not_null => 1 }, - fb_number => { type => 'text', not_null => 1 }, - title => { type => 'text' }, - description => { type => 'text' }, - complexity_id => { type => 'integer' }, - risk_id => { type => 'integer' }, - time_estimation => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, - net_sum => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, - is_flagged => { type => 'boolean', default => 'false', not_null => 1 }, - acceptance_status_id => { type => 'integer' }, - acceptance_text => { type => 'text' }, - itime => { type => 'timestamp', default => 'now()', not_null => 1 }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->table('requirement_spec_items'); + +__PACKAGE__->meta->columns( + acceptance_status_id => { type => 'integer' }, + acceptance_text => { type => 'text' }, + complexity_id => { type => 'integer' }, + description => { type => 'text' }, + fb_number => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + is_flagged => { type => 'boolean', default => 'false', not_null => 1 }, + item_type => { type => 'text', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()', not_null => 1 }, + mtime => { type => 'timestamp' }, + net_sum => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, + parent_id => { type => 'integer' }, + position => { type => 'integer', not_null => 1 }, + requirement_spec_id => { type => 'integer', not_null => 1 }, + risk_id => { type => 'integer' }, + time_estimation => { type => 'numeric', default => '0', not_null => 1, precision => 2, scale => 12 }, + title => { type => 'text' }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - allow_inline_column_values => 1, +__PACKAGE__->meta->allow_inline_column_values(1); - foreign_keys => [ - acceptance_status => { - class => 'SL::DB::RequirementSpecAcceptanceStatus', - key_columns => { acceptance_status_id => 'id' }, - }, +__PACKAGE__->meta->foreign_keys( + acceptance_status => { + class => 'SL::DB::RequirementSpecAcceptanceStatus', + key_columns => { acceptance_status_id => 'id' }, + }, - complexity => { - class => 'SL::DB::RequirementSpecComplexity', - key_columns => { complexity_id => 'id' }, - }, + complexity => { + class => 'SL::DB::RequirementSpecComplexity', + key_columns => { complexity_id => 'id' }, + }, - parent => { - class => 'SL::DB::RequirementSpecItem', - key_columns => { parent_id => 'id' }, - }, + parent => { + class => 'SL::DB::RequirementSpecItem', + key_columns => { parent_id => 'id' }, + }, - requirement_spec => { - class => 'SL::DB::RequirementSpec', - key_columns => { requirement_spec_id => 'id' }, - }, + requirement_spec => { + class => 'SL::DB::RequirementSpec', + key_columns => { requirement_spec_id => 'id' }, + }, - risk => { - class => 'SL::DB::RequirementSpecRisk', - key_columns => { risk_id => 'id' }, - }, - ], + risk => { + class => 'SL::DB::RequirementSpecRisk', + key_columns => { risk_id => 'id' }, + }, ); 1; diff --git a/SL/DB/MetaSetup/RequirementSpecPredefinedText.pm b/SL/DB/MetaSetup/RequirementSpecPredefinedText.pm index ca6442223..5cb179ccb 100644 --- a/SL/DB/MetaSetup/RequirementSpecPredefinedText.pm +++ b/SL/DB/MetaSetup/RequirementSpecPredefinedText.pm @@ -6,25 +6,23 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_predefined_texts', - - columns => [ - id => { type => 'serial', not_null => 1 }, - description => { type => 'text', not_null => 1 }, - title => { type => 'text', not_null => 1 }, - text => { type => 'text', not_null => 1 }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->table('requirement_spec_predefined_texts'); + +__PACKAGE__->meta->columns( + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + position => { type => 'integer', not_null => 1 }, + text => { type => 'text', not_null => 1 }, + title => { type => 'text', not_null => 1 }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - unique_key => [ 'description' ], +__PACKAGE__->meta->unique_keys([ 'description' ]); - allow_inline_column_values => 1, -); +__PACKAGE__->meta->allow_inline_column_values(1); 1; ; diff --git a/SL/DB/MetaSetup/RequirementSpecRisk.pm b/SL/DB/MetaSetup/RequirementSpecRisk.pm index 602413060..763f90233 100644 --- a/SL/DB/MetaSetup/RequirementSpecRisk.pm +++ b/SL/DB/MetaSetup/RequirementSpecRisk.pm @@ -6,23 +6,21 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_risks', - - columns => [ - id => { type => 'serial', not_null => 1 }, - description => { type => 'text', not_null => 1 }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->table('requirement_spec_risks'); + +__PACKAGE__->meta->columns( + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + position => { type => 'integer', not_null => 1 }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - unique_key => [ 'description' ], +__PACKAGE__->meta->unique_keys([ 'description' ]); - allow_inline_column_values => 1, -); +__PACKAGE__->meta->allow_inline_column_values(1); 1; ; diff --git a/SL/DB/MetaSetup/RequirementSpecStatus.pm b/SL/DB/MetaSetup/RequirementSpecStatus.pm index 9e9d9e221..c60156683 100644 --- a/SL/DB/MetaSetup/RequirementSpecStatus.pm +++ b/SL/DB/MetaSetup/RequirementSpecStatus.pm @@ -6,24 +6,22 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_statuses', - - columns => [ - id => { type => 'serial', not_null => 1 }, - name => { type => 'text', not_null => 1 }, - description => { type => 'text', not_null => 1 }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->table('requirement_spec_statuses'); + +__PACKAGE__->meta->columns( + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + name => { type => 'text', not_null => 1 }, + position => { type => 'integer', not_null => 1 }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - unique_key => [ 'name', 'description' ], +__PACKAGE__->meta->unique_keys([ 'name', 'description' ]); - allow_inline_column_values => 1, -); +__PACKAGE__->meta->allow_inline_column_values(1); 1; ; diff --git a/SL/DB/MetaSetup/RequirementSpecTextBlock.pm b/SL/DB/MetaSetup/RequirementSpecTextBlock.pm index 426fac092..cfccd49ae 100644 --- a/SL/DB/MetaSetup/RequirementSpecTextBlock.pm +++ b/SL/DB/MetaSetup/RequirementSpecTextBlock.pm @@ -6,31 +6,29 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_text_blocks', - - columns => [ - id => { type => 'serial', not_null => 1 }, - requirement_spec_id => { type => 'integer', not_null => 1 }, - title => { type => 'text', not_null => 1 }, - text => { type => 'text' }, - position => { type => 'integer', not_null => 1 }, - output_position => { type => 'integer', default => 1, not_null => 1 }, - itime => { type => 'timestamp', default => 'now()', not_null => 1 }, - mtime => { type => 'timestamp' }, - is_flagged => { type => 'boolean', default => 'false', not_null => 1 }, - ], - - primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, - - foreign_keys => [ - requirement_spec => { - class => 'SL::DB::RequirementSpec', - key_columns => { requirement_spec_id => 'id' }, - }, - ], +__PACKAGE__->meta->table('requirement_spec_text_blocks'); + +__PACKAGE__->meta->columns( + id => { type => 'serial', not_null => 1 }, + is_flagged => { type => 'boolean', default => 'false', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()', not_null => 1 }, + mtime => { type => 'timestamp' }, + output_position => { type => 'integer', default => 1, not_null => 1 }, + position => { type => 'integer', not_null => 1 }, + requirement_spec_id => { type => 'integer', not_null => 1 }, + text => { type => 'text' }, + title => { type => 'text', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->allow_inline_column_values(1); + +__PACKAGE__->meta->foreign_keys( + requirement_spec => { + class => 'SL::DB::RequirementSpec', + key_columns => { requirement_spec_id => 'id' }, + }, ); 1; diff --git a/SL/DB/MetaSetup/RequirementSpecType.pm b/SL/DB/MetaSetup/RequirementSpecType.pm index d3f19dbd6..5bffd8a25 100644 --- a/SL/DB/MetaSetup/RequirementSpecType.pm +++ b/SL/DB/MetaSetup/RequirementSpecType.pm @@ -6,23 +6,21 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_types', - - columns => [ - id => { type => 'serial', not_null => 1 }, - description => { type => 'text', not_null => 1 }, - position => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->table('requirement_spec_types'); + +__PACKAGE__->meta->columns( + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + position => { type => 'integer', not_null => 1 }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - unique_key => [ 'description' ], +__PACKAGE__->meta->unique_keys([ 'description' ]); - allow_inline_column_values => 1, -); +__PACKAGE__->meta->allow_inline_column_values(1); 1; ; diff --git a/SL/DB/MetaSetup/RequirementSpecVersion.pm b/SL/DB/MetaSetup/RequirementSpecVersion.pm index ac96df307..fd0dddf21 100644 --- a/SL/DB/MetaSetup/RequirementSpecVersion.pm +++ b/SL/DB/MetaSetup/RequirementSpecVersion.pm @@ -6,31 +6,29 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'requirement_spec_versions', - - columns => [ - id => { type => 'serial', not_null => 1 }, - version_number => { type => 'integer' }, - description => { type => 'text', not_null => 1 }, - comment => { type => 'text' }, - order_date => { type => 'date' }, - order_number => { type => 'text' }, - order_id => { type => 'integer' }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], - - primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, - - foreign_keys => [ - order => { - class => 'SL::DB::Order', - key_columns => { order_id => 'id' }, - }, - ], +__PACKAGE__->meta->table('requirement_spec_versions'); + +__PACKAGE__->meta->columns( + comment => { type => 'text' }, + description => { type => 'text', not_null => 1 }, + id => { type => 'serial', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + order_date => { type => 'date' }, + order_id => { type => 'integer' }, + order_number => { type => 'text' }, + version_number => { type => 'integer' }, +); + +__PACKAGE__->meta->primary_key_columns([ 'id' ]); + +__PACKAGE__->meta->allow_inline_column_values(1); + +__PACKAGE__->meta->foreign_keys( + order => { + class => 'SL::DB::Order', + key_columns => { order_id => 'id' }, + }, ); 1; diff --git a/SL/DB/ProjectParticipant.pm b/SL/DB/ProjectParticipant.pm index 5b4ada2f0..660d0ce7c 100644 --- a/SL/DB/ProjectParticipant.pm +++ b/SL/DB/ProjectParticipant.pm @@ -7,6 +7,8 @@ use strict; use SL::DB::MetaSetup::ProjectParticipant; +__PACKAGE__->meta->initialize; + # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; diff --git a/SL/DB/ProjectPhase.pm b/SL/DB/ProjectPhase.pm new file mode 100644 index 000000000..b21d0613d --- /dev/null +++ b/SL/DB/ProjectPhase.pm @@ -0,0 +1,15 @@ +# This file has been auto-generated only because it didn't exist. +# Feel free to modify it at will; it will not be overwritten automatically. + +package SL::DB::ProjectPhase; + +use strict; + +use SL::DB::MetaSetup::ProjectPhase; + +__PACKAGE__->meta->initialize; + +# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. +__PACKAGE__->meta->make_manager_class; + +1; diff --git a/SL/DB/ProjectPhaseParticipant.pm b/SL/DB/ProjectPhaseParticipant.pm index 67c7939b7..58d107c22 100644 --- a/SL/DB/ProjectPhaseParticipant.pm +++ b/SL/DB/ProjectPhaseParticipant.pm @@ -7,6 +7,8 @@ use strict; use SL::DB::MetaSetup::ProjectPhaseParticipant; +__PACKAGE__->meta->initialize; + # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; diff --git a/SL/DB/ProjectRole.pm b/SL/DB/ProjectRole.pm index 444d11117..e09f9af36 100644 --- a/SL/DB/ProjectRole.pm +++ b/SL/DB/ProjectRole.pm @@ -7,6 +7,8 @@ use strict; use SL::DB::MetaSetup::ProjectRole; +__PACKAGE__->meta->initialize; + # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; diff --git a/SL/DB/RequirementSpecAcceptanceStatus.pm b/SL/DB/RequirementSpecAcceptanceStatus.pm index e709f8dcd..11d92daca 100644 --- a/SL/DB/RequirementSpecAcceptanceStatus.pm +++ b/SL/DB/RequirementSpecAcceptanceStatus.pm @@ -9,6 +9,8 @@ use SL::DB::Manager::RequirementSpecAcceptanceStatus; use SL::DB::Helper::ActsAsList; use SL::Locale::String; +__PACKAGE__->meta->initialize; + our @valid_names = qw(accepted accepted_with_defects accepted_with_defects_to_be_fixed not_accepted); sub validate { diff --git a/SL/DB/RequirementSpecComplexity.pm b/SL/DB/RequirementSpecComplexity.pm index 2ec63feff..5cdea0c06 100644 --- a/SL/DB/RequirementSpecComplexity.pm +++ b/SL/DB/RequirementSpecComplexity.pm @@ -7,6 +7,8 @@ use SL::DB::Manager::RequirementSpecComplexity; use SL::DB::Helper::ActsAsList; use SL::Locale::String; +__PACKAGE__->meta->initialize; + sub validate { my ($self) = @_; diff --git a/SL/DB/RequirementSpecDependency.pm b/SL/DB/RequirementSpecDependency.pm index 029c84eab..d4e5a58b7 100644 --- a/SL/DB/RequirementSpecDependency.pm +++ b/SL/DB/RequirementSpecDependency.pm @@ -7,6 +7,8 @@ use strict; use SL::DB::MetaSetup::RequirementSpecDependency; +__PACKAGE__->meta->initialize; + # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; diff --git a/SL/DB/RequirementSpecPredefinedText.pm b/SL/DB/RequirementSpecPredefinedText.pm index f0d25cafd..33738ead8 100644 --- a/SL/DB/RequirementSpecPredefinedText.pm +++ b/SL/DB/RequirementSpecPredefinedText.pm @@ -7,6 +7,8 @@ use SL::DB::Manager::RequirementSpecPredefinedText; use SL::DB::Helper::ActsAsList; use SL::Locale::String; +__PACKAGE__->meta->initialize; + sub validate { my ($self) = @_; diff --git a/SL/DB/RequirementSpecRisk.pm b/SL/DB/RequirementSpecRisk.pm index 7d1449bf2..e2179d32f 100644 --- a/SL/DB/RequirementSpecRisk.pm +++ b/SL/DB/RequirementSpecRisk.pm @@ -7,6 +7,8 @@ use SL::DB::Manager::RequirementSpecRisk; use SL::DB::Helper::ActsAsList; use SL::Locale::String; +__PACKAGE__->meta->initialize; + sub validate { my ($self) = @_; diff --git a/SL/DB/RequirementSpecStatus.pm b/SL/DB/RequirementSpecStatus.pm index d1e3986c2..84367994a 100644 --- a/SL/DB/RequirementSpecStatus.pm +++ b/SL/DB/RequirementSpecStatus.pm @@ -9,6 +9,8 @@ use SL::DB::Manager::RequirementSpecStatus; use SL::DB::Helper::ActsAsList; use SL::Locale::String; +__PACKAGE__->meta->initialize; + our @valid_names = qw(planning running done); sub validate { diff --git a/SL/DB/RequirementSpecType.pm b/SL/DB/RequirementSpecType.pm index fa2c2429c..65256808b 100644 --- a/SL/DB/RequirementSpecType.pm +++ b/SL/DB/RequirementSpecType.pm @@ -7,6 +7,8 @@ use SL::DB::Manager::RequirementSpecType; use SL::DB::Helper::ActsAsList; use SL::Locale::String; +__PACKAGE__->meta->initialize; + sub validate { my ($self) = @_; diff --git a/SL/DB/RequirementSpecVersion.pm b/SL/DB/RequirementSpecVersion.pm index e37b2c7d8..cde11f173 100644 --- a/SL/DB/RequirementSpecVersion.pm +++ b/SL/DB/RequirementSpecVersion.pm @@ -5,6 +5,8 @@ use strict; use SL::DB::MetaSetup::RequirementSpecVersion; use SL::Locale::String; +__PACKAGE__->meta->initialize; + # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class;