Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 57d97e2b

Von Moritz Bunkus vor fast 11 Jahren hinzugefügt

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

Defaultwerte für itime-Spalten fixen

Unterschiede anzeigen:

SL/DB/MetaSetup/ProjectParticipant.pm
cost_per_hour => { type => 'numeric', precision => 5, scale => 15 },
employee_id => { type => 'integer', not_null => 1 },
id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
itime => { type => 'timestamp', default => 'now()' },
minutes => { type => 'integer', default => '0', not_null => 1 },
mtime => { type => 'timestamp' },
project_id => { type => 'integer', not_null => 1 },
......
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
__PACKAGE__->meta->foreign_keys(
employee => {
class => 'SL::DB::Employee',
SL/DB/MetaSetup/ProjectPhase.pm
general_cost_per_hour => { type => 'numeric', default => '0', not_null => 1, precision => 5, scale => 15 },
general_minutes => { type => 'integer', default => '0', not_null => 1 },
id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
name => { type => 'text', not_null => 1 },
project_id => { type => 'integer' },
......
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
__PACKAGE__->meta->foreign_keys(
project => {
class => 'SL::DB::Project',
SL/DB/MetaSetup/ProjectPhaseParticipant.pm
cost_per_hour => { type => 'numeric', precision => 5, scale => 15 },
employee_id => { type => 'integer', not_null => 1 },
id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
itime => { type => 'timestamp', default => 'now()' },
minutes => { type => 'integer', default => '0', not_null => 1 },
mtime => { type => 'timestamp' },
project_phase_id => { type => 'integer', not_null => 1 },
......
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
__PACKAGE__->meta->foreign_keys(
employee => {
class => 'SL::DB::Employee',
SL/DB/MetaSetup/ProjectRole.pm
__PACKAGE__->meta->columns(
description => { type => 'text', not_null => 1 },
id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
name => { type => 'text', not_null => 1 },
position => { type => 'integer', not_null => 1 },
......
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
1;
;
SL/DB/MetaSetup/ProjectStatus.pm
__PACKAGE__->meta->columns(
description => { type => 'text', not_null => 1 },
id => { type => 'serial', not_null => 1 },
itime => { type => 'timestamp', default => '2013-05-08 09:11:09.704126' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
name => { type => 'text', not_null => 1 },
position => { type => 'integer', not_null => 1 },
......
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
__PACKAGE__->meta->allow_inline_column_values(1);
1;
;
sql/Pg-upgrade2/project_bob_attributes.sql
name TEXT NOT NULL,
description TEXT NOT NULL,
position INTEGER NOT NULL,
itime TIMESTAMP DEFAULT 'now()',
itime TIMESTAMP DEFAULT now(),
mtime TIMESTAMP
);
......
budget_cost NUMERIC (15,5) NOT NULL DEFAULT 0,
general_minutes INTEGER NOT NULL DEFAULT 0,
general_cost_per_hour NUMERIC (15,5) NOT NULL DEFAULT 0,
itime TIMESTAMP DEFAULT 'now()',
itime TIMESTAMP DEFAULT now(),
mtime TIMESTAMP
);
......
name TEXT NOT NULL,
description TEXT NOT NULL,
position INTEGER NOT NULL,
itime TIMESTAMP DEFAULT 'now()',
itime TIMESTAMP DEFAULT now(),
mtime TIMESTAMP
);
......
project_role_id INTEGER NOT NULL REFERENCES project_roles(id),
minutes INTEGER NOT NULL DEFAULT 0,
cost_per_hour NUMERIC (15,5),
itime TIMESTAMP DEFAULT 'now()',
itime TIMESTAMP DEFAULT now(),
mtime TIMESTAMP
);
......
project_role_id INTEGER NOT NULL REFERENCES project_roles(id),
minutes INTEGER NOT NULL DEFAULT 0,
cost_per_hour NUMERIC (15,5),
itime TIMESTAMP DEFAULT 'now()',
itime TIMESTAMP DEFAULT now(),
mtime TIMESTAMP
);
sql/Pg-upgrade2/project_bob_attributes_itime_default_fix.sql
-- @tag: project_bob_attributes_itime_default_fix
-- @description: Standardwert für 'itime'-Spalten in Bob-Tabellen fixen
-- @depends: release_3_0_0
ALTER TABLE project ALTER COLUMN itime SET DEFAULT now();
ALTER TABLE project_status ALTER COLUMN itime SET DEFAULT now();
ALTER TABLE project_phases ALTER COLUMN itime SET DEFAULT now();
ALTER TABLE project_roles ALTER COLUMN itime SET DEFAULT now();
ALTER TABLE project_participants ALTER COLUMN itime SET DEFAULT now();
ALTER TABLE project_phase_participants ALTER COLUMN itime SET DEFAULT now();

Auch abrufbar als: Unified diff