From: Moritz Bunkus Date: Tue, 21 Jan 2014 13:48:56 +0000 (+0100) Subject: Tabelle »project_status« in »project_statuses« umbenennen X-Git-Tag: release-3.2.0beta~467^2~28 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=16d62a38a2a09f189ec48d34be78311970542c8c;p=kivitendo-erp.git Tabelle »project_status« in »project_statuses« umbenennen Im Englischen ist der Plural von »status« nun einmal »statuses«. Außerdem heißen die Tabellen in Legacy-Bob-Code ebenfalls »project_statuses«. --- diff --git a/SL/DB/MetaSetup/ProjectStatus.pm b/SL/DB/MetaSetup/ProjectStatus.pm index b79110a61..4162812f3 100644 --- a/SL/DB/MetaSetup/ProjectStatus.pm +++ b/SL/DB/MetaSetup/ProjectStatus.pm @@ -6,7 +6,7 @@ use strict; 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 }, diff --git a/sql/Pg-upgrade2/project_bob_attributes.sql b/sql/Pg-upgrade2/project_bob_attributes.sql index d651f1038..88ea42fd8 100644 --- a/sql/Pg-upgrade2/project_bob_attributes.sql +++ b/sql/Pg-upgrade2/project_bob_attributes.sql @@ -5,7 +5,6 @@ -- 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 diff --git a/sql/Pg-upgrade2/project_bob_attributes_fix_project_status_table_name.sql b/sql/Pg-upgrade2/project_bob_attributes_fix_project_status_table_name.sql new file mode 100644 index 000000000..8b2a1ae7e --- /dev/null +++ b/sql/Pg-upgrade2/project_bob_attributes_fix_project_status_table_name.sql @@ -0,0 +1,4 @@ +-- @tag: project_bob_attributes_fix_project_status_table_name +-- @description: Tabellennamen project_status in project_statuses korrigieren +-- @depends: project_bob_attributes +ALTER TABLE project_status RENAME TO project_statuses; diff --git a/sql/Pg-upgrade2/project_status_default_entries.sql b/sql/Pg-upgrade2/project_status_default_entries.sql index d4bd437f4..5120b6ad9 100644 --- a/sql/Pg-upgrade2/project_status_default_entries.sql +++ b/sql/Pg-upgrade2/project_status_default_entries.sql @@ -1,16 +1,16 @@ -- @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;