Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 57d97e2b

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID 57d97e2ba47a46a15a71b1fcbdd4d26bfc5205a3
  • Vorgänger 50aabb48
  • Nachfolger 687a09d8

Defaultwerte für itime-Spalten fixen

Unterschiede anzeigen:

SL/DB/MetaSetup/ProjectParticipant.pm
12 12
  cost_per_hour   => { type => 'numeric', precision => 5, scale => 15 },
13 13
  employee_id     => { type => 'integer', not_null => 1 },
14 14
  id              => { type => 'serial', not_null => 1 },
15
  itime           => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
15
  itime           => { type => 'timestamp', default => 'now()' },
16 16
  minutes         => { type => 'integer', default => '0', not_null => 1 },
17 17
  mtime           => { type => 'timestamp' },
18 18
  project_id      => { type => 'integer', not_null => 1 },
......
21 21

  
22 22
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
23 23

  
24
__PACKAGE__->meta->allow_inline_column_values(1);
25

  
24 26
__PACKAGE__->meta->foreign_keys(
25 27
  employee => {
26 28
    class       => 'SL::DB::Employee',
SL/DB/MetaSetup/ProjectPhase.pm
16 16
  general_cost_per_hour => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 },
17 17
  general_minutes       => { type => 'integer', default => '0', not_null => 1 },
18 18
  id                    => { type => 'serial', not_null => 1 },
19
  itime                 => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
19
  itime                 => { type => 'timestamp', default => 'now()' },
20 20
  mtime                 => { type => 'timestamp' },
21 21
  name                  => { type => 'text', not_null => 1 },
22 22
  project_id            => { type => 'integer' },
......
25 25

  
26 26
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
27 27

  
28
__PACKAGE__->meta->allow_inline_column_values(1);
29

  
28 30
__PACKAGE__->meta->foreign_keys(
29 31
  project => {
30 32
    class       => 'SL::DB::Project',
SL/DB/MetaSetup/ProjectPhaseParticipant.pm
12 12
  cost_per_hour    => { type => 'numeric', precision => 5, scale => 15 },
13 13
  employee_id      => { type => 'integer', not_null => 1 },
14 14
  id               => { type => 'serial', not_null => 1 },
15
  itime            => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
15
  itime            => { type => 'timestamp', default => 'now()' },
16 16
  minutes          => { type => 'integer', default => '0', not_null => 1 },
17 17
  mtime            => { type => 'timestamp' },
18 18
  project_phase_id => { type => 'integer', not_null => 1 },
......
21 21

  
22 22
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
23 23

  
24
__PACKAGE__->meta->allow_inline_column_values(1);
25

  
24 26
__PACKAGE__->meta->foreign_keys(
25 27
  employee => {
26 28
    class       => 'SL::DB::Employee',
SL/DB/MetaSetup/ProjectRole.pm
11 11
__PACKAGE__->meta->columns(
12 12
  description => { type => 'text', not_null => 1 },
13 13
  id          => { type => 'serial', not_null => 1 },
14
  itime       => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
14
  itime       => { type => 'timestamp', default => 'now()' },
15 15
  mtime       => { type => 'timestamp' },
16 16
  name        => { type => 'text', not_null => 1 },
17 17
  position    => { type => 'integer', not_null => 1 },
......
19 19

  
20 20
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
21 21

  
22
__PACKAGE__->meta->allow_inline_column_values(1);
23

  
22 24
1;
23 25
;
SL/DB/MetaSetup/ProjectStatus.pm
11 11
__PACKAGE__->meta->columns(
12 12
  description => { type => 'text', not_null => 1 },
13 13
  id          => { type => 'serial', not_null => 1 },
14
  itime       => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
14
  itime       => { type => 'timestamp', default => 'now()' },
15 15
  mtime       => { type => 'timestamp' },
16 16
  name        => { type => 'text', not_null => 1 },
17 17
  position    => { type => 'integer', not_null => 1 },
......
19 19

  
20 20
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
21 21

  
22
__PACKAGE__->meta->allow_inline_column_values(1);
23

  
22 24
1;
23 25
;
sql/Pg-upgrade2/project_bob_attributes.sql
22 22
  name        TEXT      NOT NULL,
23 23
  description TEXT      NOT NULL,
24 24
  position    INTEGER   NOT NULL,
25
  itime       TIMESTAMP DEFAULT 'now()',
25
  itime       TIMESTAMP DEFAULT now(),
26 26
  mtime       TIMESTAMP
27 27
);
28 28

  
......
48 48
  budget_cost     NUMERIC (15,5)       NOT NULL DEFAULT 0,
49 49
  general_minutes INTEGER              NOT NULL DEFAULT 0,
50 50
  general_cost_per_hour NUMERIC (15,5) NOT NULL DEFAULT 0,
51
  itime           TIMESTAMP DEFAULT 'now()',
51
  itime           TIMESTAMP DEFAULT now(),
52 52
  mtime           TIMESTAMP
53 53
);
54 54

  
......
57 57
  name         TEXT    NOT NULL,
58 58
  description  TEXT    NOT NULL,
59 59
  position     INTEGER NOT NULL,
60
  itime        TIMESTAMP DEFAULT 'now()',
60
  itime        TIMESTAMP DEFAULT now(),
61 61
  mtime        TIMESTAMP
62 62
);
63 63

  
......
68 68
  project_role_id INTEGER NOT NULL REFERENCES project_roles(id),
69 69
  minutes         INTEGER NOT NULL DEFAULT 0,
70 70
  cost_per_hour   NUMERIC (15,5),
71
  itime           TIMESTAMP DEFAULT 'now()',
71
  itime           TIMESTAMP DEFAULT now(),
72 72
  mtime           TIMESTAMP
73 73
);
74 74

  
......
79 79
  project_role_id  INTEGER NOT NULL REFERENCES project_roles(id),
80 80
  minutes          INTEGER NOT NULL DEFAULT 0,
81 81
  cost_per_hour    NUMERIC (15,5),
82
  itime            TIMESTAMP DEFAULT 'now()',
82
  itime            TIMESTAMP DEFAULT now(),
83 83
  mtime            TIMESTAMP
84 84
);
85 85

  
sql/Pg-upgrade2/project_bob_attributes_itime_default_fix.sql
1
-- @tag: project_bob_attributes_itime_default_fix
2
-- @description: Standardwert für 'itime'-Spalten in Bob-Tabellen fixen
3
-- @depends: release_3_0_0
4

  
5
ALTER TABLE project                    ALTER COLUMN itime SET DEFAULT now();
6
ALTER TABLE project_status             ALTER COLUMN itime SET DEFAULT now();
7
ALTER TABLE project_phases             ALTER COLUMN itime SET DEFAULT now();
8
ALTER TABLE project_roles              ALTER COLUMN itime SET DEFAULT now();
9
ALTER TABLE project_participants       ALTER COLUMN itime SET DEFAULT now();
10
ALTER TABLE project_phase_participants ALTER COLUMN itime SET DEFAULT now();

Auch abrufbar als: Unified diff