Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1ae7f9a1

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID 1ae7f9a1d11944a7e9c64ea791540b95db729e9a
  • Vorgänger 8e082571
  • Nachfolger 8b4ff253

Projekte: Status zum Pflichtfeld gemacht

Unterschiede anzeigen:

SL/DB/MetaSetup/Project.pm
20 20
  itime                => { type => 'timestamp', default => 'now()' },
21 21
  mtime                => { type => 'timestamp' },
22 22
  order_value          => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 },
23
  project_status_id    => { type => 'integer' },
23
  project_status_id    => { type => 'integer', not_null => 1 },
24 24
  project_type_id      => { type => 'integer', not_null => 1 },
25 25
  projectnumber        => { type => 'text' },
26 26
  start_date           => { type => 'date' },
sql/Pg-upgrade2/project_status_default_entries.sql
6 6
INSERT INTO project_status (name, description, position) VALUES ('planning', 'In Planung',     2);
7 7
INSERT INTO project_status (name, description, position) VALUES ('running',  'In Bearbeitung', 3);
8 8
INSERT INTO project_status (name, description, position) VALUES ('done',     'Fertiggestellt', 4);
9

  
10
UPDATE project
11
SET project_status_id = (
12
  SELECT id
13
  FROM project_status
14
  WHERE name = 'running'
15
)
16
WHERE project_status_id IS NULL;
17

  
18
ALTER TABLE project ALTER COLUMN project_status_id SET NOT NULL;

Auch abrufbar als: Unified diff