From 49644f8f89ef5e337763ab013b8cdce6d28f4493 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 12 Mar 2013 16:01:00 +0100 Subject: [PATCH] =?utf8?q?Pflichtenhefttextbl=C3=B6cke=20(DB):=20Spalte=20?= =?utf8?q?"is=5Fflagged"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/MetaSetup/RequirementSpecTextBlock.pm | 8 ++++++++ SL/DB/RequirementSpecTextBlock.pm | 8 -------- sql/Pg-upgrade2/requirement_specs.sql | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) 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, -- 2.20.1