Revision 75563c5f
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/MetaSetup/RequirementSpec.pm | ||
---|---|---|
22 | 22 |
status_id => { type => 'integer' }, |
23 | 23 |
time_estimation => { type => 'numeric', default => '0', not_null => 1, precision => 12, scale => 2 }, |
24 | 24 |
title => { type => 'text', not_null => 1 }, |
25 |
type_id => { type => 'integer' }, |
|
25 |
type_id => { type => 'integer', not_null => 1 },
|
|
26 | 26 |
working_copy_id => { type => 'integer' }, |
27 | 27 |
); |
28 | 28 |
|
sql/Pg-upgrade2/requirement_spec_type_for_template_fix.sql | ||
---|---|---|
1 |
-- @tag: requirement_spec_type_for_template_fix |
|
2 |
-- @description: requirement_spec_type_for_template_fix |
|
3 |
-- @depends: requirement_spec_types_number_formats |
|
4 |
UPDATE requirement_specs |
|
5 |
SET type_id = ( |
|
6 |
SELECT MIN(id) |
|
7 |
FROM requirement_spec_types |
|
8 |
) |
|
9 |
WHERE type_id IS NULL; |
|
10 |
|
|
11 |
ALTER TABLE requirement_specs ALTER COLUMN type_id SET NOT NULL; |
Auch abrufbar als: Unified diff
Pflichtenhefte: type_id darf nicht NULL sein