From: Moritz Bunkus Date: Tue, 12 Mar 2013 15:01:00 +0000 (+0100) Subject: Pflichtenhefttextblöcke (DB): Spalte "is_flagged" X-Git-Tag: release-3.2.0beta~467^2~217 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=49644f8f89ef5e337763ab013b8cdce6d28f4493;p=kivitendo-erp.git Pflichtenhefttextblöcke (DB): Spalte "is_flagged" --- diff --git a/SL/DB/MetaSetup/RequirementSpecTextBlock.pm b/SL/DB/MetaSetup/RequirementSpecTextBlock.pm index adb203e71..426fac092 100644 --- a/SL/DB/MetaSetup/RequirementSpecTextBlock.pm +++ b/SL/DB/MetaSetup/RequirementSpecTextBlock.pm @@ -18,11 +18,19 @@ __PACKAGE__->meta->setup( 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' }, + }, + ], ); 1; diff --git a/SL/DB/RequirementSpecTextBlock.pm b/SL/DB/RequirementSpecTextBlock.pm index b89eacccf..1db862313 100644 --- a/SL/DB/RequirementSpecTextBlock.pm +++ b/SL/DB/RequirementSpecTextBlock.pm @@ -7,14 +7,6 @@ use SL::DB::Manager::RequirementSpecTextBlock; use SL::DB::Helper::ActsAsList; use SL::Locale::String; -__PACKAGE__->meta->add_relationships( - requirement_spec => { - type => 'one to many', - class => 'SL::DB::RequirementSpec', - column_map => { requirement_spec_id => 'id' }, - }, -); - __PACKAGE__->meta->initialize; __PACKAGE__->configure_acts_as_list(group_by => [qw(requirement_spec_id output_position)]); diff --git a/sql/Pg-upgrade2/requirement_specs.sql b/sql/Pg-upgrade2/requirement_specs.sql index 9271732e4..86a3c5022 100644 --- a/sql/Pg-upgrade2/requirement_specs.sql +++ b/sql/Pg-upgrade2/requirement_specs.sql @@ -189,6 +189,7 @@ CREATE TABLE requirement_spec_text_blocks ( text TEXT, position INTEGER NOT NULL, output_position INTEGER NOT NULL DEFAULT 1, + is_flagged BOOLEAN NOT NULL DEFAULT FALSE, itime TIMESTAMP NOT NULL DEFAULT now(), mtime TIMESTAMP,