Revision 49644f8f
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/MetaSetup/RequirementSpecTextBlock.pm | ||
---|---|---|
18 | 18 |
output_position => { type => 'integer', default => 1, not_null => 1 }, |
19 | 19 |
itime => { type => 'timestamp', default => 'now()', not_null => 1 }, |
20 | 20 |
mtime => { type => 'timestamp' }, |
21 |
is_flagged => { type => 'boolean', default => 'false', not_null => 1 }, |
|
21 | 22 |
], |
22 | 23 |
|
23 | 24 |
primary_key_columns => [ 'id' ], |
24 | 25 |
|
25 | 26 |
allow_inline_column_values => 1, |
27 |
|
|
28 |
foreign_keys => [ |
|
29 |
requirement_spec => { |
|
30 |
class => 'SL::DB::RequirementSpec', |
|
31 |
key_columns => { requirement_spec_id => 'id' }, |
|
32 |
}, |
|
33 |
], |
|
26 | 34 |
); |
27 | 35 |
|
28 | 36 |
1; |
SL/DB/RequirementSpecTextBlock.pm | ||
---|---|---|
7 | 7 |
use SL::DB::Helper::ActsAsList; |
8 | 8 |
use SL::Locale::String; |
9 | 9 |
|
10 |
__PACKAGE__->meta->add_relationships( |
|
11 |
requirement_spec => { |
|
12 |
type => 'one to many', |
|
13 |
class => 'SL::DB::RequirementSpec', |
|
14 |
column_map => { requirement_spec_id => 'id' }, |
|
15 |
}, |
|
16 |
); |
|
17 |
|
|
18 | 10 |
__PACKAGE__->meta->initialize; |
19 | 11 |
|
20 | 12 |
__PACKAGE__->configure_acts_as_list(group_by => [qw(requirement_spec_id output_position)]); |
sql/Pg-upgrade2/requirement_specs.sql | ||
---|---|---|
189 | 189 |
text TEXT, |
190 | 190 |
position INTEGER NOT NULL, |
191 | 191 |
output_position INTEGER NOT NULL DEFAULT 1, |
192 |
is_flagged BOOLEAN NOT NULL DEFAULT FALSE, |
|
192 | 193 |
itime TIMESTAMP NOT NULL DEFAULT now(), |
193 | 194 |
mtime TIMESTAMP, |
194 | 195 |
|
Auch abrufbar als: Unified diff
Pflichtenhefttextblöcke (DB): Spalte "is_flagged"