use base qw(SL::DB::Object);
-__PACKAGE__->meta->table('project_status');
+__PACKAGE__->meta->table('project_statuses');
__PACKAGE__->meta->columns(
description => { type => 'text', not_null => 1 },
-- changes over bob:
-- no scon/support_contract values here
-- no include or expclude flags for workload
--- statuses renamed to status (we dont use rails weird plurals)
-- created_at/updated_at renamed to itime/mtime,
-- varchars retyped to text
-- hours (numeric) changed to minutes (integer) since the code already calculates in minutes
-- @tag: project_status_default_entries
-- @description: Standardeinträge für Projektstatus
--- @depends: project_bob_attributes
+-- @depends: project_bob_attributes_fix_project_status_table_name
-INSERT INTO project_status (name, description, position) VALUES ('presales', 'Akquise', 1);
-INSERT INTO project_status (name, description, position) VALUES ('planning', 'In Planung', 2);
-INSERT INTO project_status (name, description, position) VALUES ('running', 'In Bearbeitung', 3);
-INSERT INTO project_status (name, description, position) VALUES ('done', 'Fertiggestellt', 4);
+INSERT INTO project_statuses (name, description, position) VALUES ('presales', 'Akquise', 1);
+INSERT INTO project_statuses (name, description, position) VALUES ('planning', 'In Planung', 2);
+INSERT INTO project_statuses (name, description, position) VALUES ('running', 'In Bearbeitung', 3);
+INSERT INTO project_statuses (name, description, position) VALUES ('done', 'Fertiggestellt', 4);
UPDATE project
SET project_status_id = (
SELECT id
- FROM project_status
+ FROM project_statuses
WHERE name = 'running'
)
WHERE project_status_id IS NULL;