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',
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',
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',
__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;
;
__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;
;
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
);
--- /dev/null
+-- @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();