From 532e83faf58f1a6ba4a166c6eae8725ecba3b4b7 Mon Sep 17 00:00:00 2001
From: Torgny Nyblom <kde@nyblom.org>
Date: Sun, 26 Dec 2010 22:28:55 +0100
Subject: [PATCH] Make sure name in enclosed in quotation marks

Needed for rails 2.3.8
---
 db/migrate/027_create_wikis.rb                     |    2 +-
 db/migrate/028_create_wiki_pages.rb                |    2 +-
 db/migrate/029_create_wiki_contents.rb             |    4 ++--
 db/migrate/032_create_time_entries.rb              |    4 ++--
 db/migrate/034_create_changesets.rb                |    2 +-
 db/migrate/035_create_changes.rb                   |    2 +-
 db/migrate/040_create_changesets_issues.rb         |    2 +-
 db/migrate/045_create_boards.rb                    |    2 +-
 db/migrate/046_create_messages.rb                  |    4 ++--
 .../066_add_custom_value_customized_index.rb       |    4 ++--
 db/migrate/067_create_wiki_redirects.rb            |    2 +-
 db/migrate/068_create_enabled_modules.rb           |    2 +-
 db/migrate/081_create_projects_trackers.rb         |    2 +-
 ...d_role_tracker_old_status_index_to_workflows.rb |    4 ++--
 ...090214190337_add_watchers_user_id_type_index.rb |    4 ++--
 ...312194159_add_projects_trackers_unique_index.rb |    4 ++--
 db/migrate/20090704172355_create_groups_users.rb   |    2 +-
 ...20100221100219_add_index_on_changesets_scmid.rb |    4 ++--
 18 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/db/migrate/027_create_wikis.rb b/db/migrate/027_create_wikis.rb
index ed67842..d7ed80b 100644
--- a/db/migrate/027_create_wikis.rb
+++ b/db/migrate/027_create_wikis.rb
@@ -5,7 +5,7 @@ class CreateWikis < ActiveRecord::Migration
       t.column :start_page, :string,  :limit => 255, :null => false
       t.column :status, :integer, :default => 1, :null => false
     end    
-    add_index :wikis, :project_id, :name => :wikis_project_id
+    add_index :wikis, :project_id, :name => ":wikis_project_id"
   end
 
   def self.down
diff --git a/db/migrate/028_create_wiki_pages.rb b/db/migrate/028_create_wiki_pages.rb
index 535cbfb..3c89f58 100644
--- a/db/migrate/028_create_wiki_pages.rb
+++ b/db/migrate/028_create_wiki_pages.rb
@@ -5,7 +5,7 @@ class CreateWikiPages < ActiveRecord::Migration
       t.column :title, :string, :limit => 255, :null => false
       t.column :created_on, :datetime, :null => false    
     end
-    add_index :wiki_pages, [:wiki_id, :title], :name => :wiki_pages_wiki_id_title
+    add_index :wiki_pages, [:wiki_id, :title], :name => ":wiki_pages_wiki_id_title"
   end
 
   def self.down
diff --git a/db/migrate/029_create_wiki_contents.rb b/db/migrate/029_create_wiki_contents.rb
index c5c9f2a..30c4b83 100644
--- a/db/migrate/029_create_wiki_contents.rb
+++ b/db/migrate/029_create_wiki_contents.rb
@@ -8,7 +8,7 @@ class CreateWikiContents < ActiveRecord::Migration
       t.column :updated_on, :datetime, :null => false
       t.column :version, :integer, :null => false
     end
-    add_index :wiki_contents, :page_id, :name => :wiki_contents_page_id
+    add_index :wiki_contents, :page_id, :name => ":wiki_contents_page_id"
     
     create_table :wiki_content_versions do |t|
       t.column :wiki_content_id, :integer, :null => false
@@ -20,7 +20,7 @@ class CreateWikiContents < ActiveRecord::Migration
       t.column :updated_on, :datetime, :null => false
       t.column :version, :integer, :null => false
     end
-    add_index :wiki_content_versions, :wiki_content_id, :name => :wiki_content_versions_wcid
+    add_index :wiki_content_versions, :wiki_content_id, :name => ":wiki_content_versions_wcid"
   end
 
   def self.down
diff --git a/db/migrate/032_create_time_entries.rb b/db/migrate/032_create_time_entries.rb
index 9b9a54e..03280ad 100644
--- a/db/migrate/032_create_time_entries.rb
+++ b/db/migrate/032_create_time_entries.rb
@@ -14,8 +14,8 @@ class CreateTimeEntries < ActiveRecord::Migration
       t.column :created_on,  :datetime, :null => false
       t.column :updated_on,  :datetime, :null => false
     end
-    add_index :time_entries, [:project_id], :name => :time_entries_project_id
-    add_index :time_entries, [:issue_id], :name => :time_entries_issue_id
+    add_index :time_entries, [:project_id], :name => ":time_entries_project_id"
+    add_index :time_entries, [:issue_id], :name => ":time_entries_issue_id"
   end
 
   def self.down
diff --git a/db/migrate/034_create_changesets.rb b/db/migrate/034_create_changesets.rb
index 612fd46..759b73c 100644
--- a/db/migrate/034_create_changesets.rb
+++ b/db/migrate/034_create_changesets.rb
@@ -7,7 +7,7 @@ class CreateChangesets < ActiveRecord::Migration
       t.column :committed_on, :datetime, :null => false
       t.column :comments, :text
     end
-    add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
+    add_index :changesets, [:repository_id, :revision], :unique => true, :name => ":changesets_repos_rev"
   end
 
   def self.down
diff --git a/db/migrate/035_create_changes.rb b/db/migrate/035_create_changes.rb
index fa0cfac..2f60740 100644
--- a/db/migrate/035_create_changes.rb
+++ b/db/migrate/035_create_changes.rb
@@ -7,7 +7,7 @@ class CreateChanges < ActiveRecord::Migration
       t.column :from_path, :string
       t.column :from_revision, :integer
     end
-    add_index :changes, [:changeset_id], :name => :changesets_changeset_id
+    add_index :changes, [:changeset_id], :name => ":changesets_changeset_id"
   end
 
   def self.down
diff --git a/db/migrate/040_create_changesets_issues.rb b/db/migrate/040_create_changesets_issues.rb
index 494d3cc..dadacaf 100644
--- a/db/migrate/040_create_changesets_issues.rb
+++ b/db/migrate/040_create_changesets_issues.rb
@@ -4,7 +4,7 @@ class CreateChangesetsIssues < ActiveRecord::Migration
       t.column :changeset_id, :integer, :null => false
       t.column :issue_id, :integer, :null => false
     end
-    add_index :changesets_issues, [:changeset_id, :issue_id], :unique => true, :name => :changesets_issues_ids
+    add_index :changesets_issues, [:changeset_id, :issue_id], :unique => true, :name => ":changesets_issues_ids"
   end
 
   def self.down
diff --git a/db/migrate/045_create_boards.rb b/db/migrate/045_create_boards.rb
index 17f2bbb..2734e5e 100644
--- a/db/migrate/045_create_boards.rb
+++ b/db/migrate/045_create_boards.rb
@@ -9,7 +9,7 @@ class CreateBoards < ActiveRecord::Migration
       t.column :messages_count, :integer, :default => 0, :null => false
       t.column :last_message_id, :integer
     end
-    add_index :boards, [:project_id], :name => :boards_project_id
+    add_index :boards, [:project_id], :name => ":boards_project_id"
   end
 
   def self.down
diff --git a/db/migrate/046_create_messages.rb b/db/migrate/046_create_messages.rb
index d99aaf8..66d7944 100644
--- a/db/migrate/046_create_messages.rb
+++ b/db/migrate/046_create_messages.rb
@@ -11,8 +11,8 @@ class CreateMessages < ActiveRecord::Migration
       t.column :created_on, :datetime, :null => false
       t.column :updated_on, :datetime, :null => false
     end
-    add_index :messages, [:board_id], :name => :messages_board_id
-    add_index :messages, [:parent_id], :name => :messages_parent_id
+    add_index :messages, [:board_id], :name => ":messages_board_id"
+    add_index :messages, [:parent_id], :name => ":messages_parent_id"
   end
 
   def self.down
diff --git a/db/migrate/066_add_custom_value_customized_index.rb b/db/migrate/066_add_custom_value_customized_index.rb
index 1f4c40d..c70f2f5 100644
--- a/db/migrate/066_add_custom_value_customized_index.rb
+++ b/db/migrate/066_add_custom_value_customized_index.rb
@@ -1,9 +1,9 @@
 class AddCustomValueCustomizedIndex < ActiveRecord::Migration
   def self.up
-    add_index :custom_values, [:customized_type, :customized_id], :name => :custom_values_customized
+    add_index :custom_values, [:customized_type, :customized_id], :name => ":custom_values_customized"
   end
 
   def self.down
-    remove_index :custom_values, :name => :custom_values_customized
+    remove_index :custom_values, :name => ":custom_values_customized"
   end
 end
diff --git a/db/migrate/067_create_wiki_redirects.rb b/db/migrate/067_create_wiki_redirects.rb
index dda6ba6..8c99895 100644
--- a/db/migrate/067_create_wiki_redirects.rb
+++ b/db/migrate/067_create_wiki_redirects.rb
@@ -6,7 +6,7 @@ class CreateWikiRedirects < ActiveRecord::Migration
       t.column :redirects_to, :string
       t.column :created_on, :datetime, :null => false
     end
-    add_index :wiki_redirects, [:wiki_id, :title], :name => :wiki_redirects_wiki_id_title
+    add_index :wiki_redirects, [:wiki_id, :title], :name => ":wiki_redirects_wiki_id_title"
   end
 
   def self.down
diff --git a/db/migrate/068_create_enabled_modules.rb b/db/migrate/068_create_enabled_modules.rb
index fd848ef..5f42982 100644
--- a/db/migrate/068_create_enabled_modules.rb
+++ b/db/migrate/068_create_enabled_modules.rb
@@ -4,7 +4,7 @@ class CreateEnabledModules < ActiveRecord::Migration
       t.column :project_id, :integer
       t.column :name, :string, :null => false
     end
-    add_index :enabled_modules, [:project_id], :name => :enabled_modules_project_id
+    add_index :enabled_modules, [:project_id], :name => ":enabled_modules_project_id"
     
     # Enable all modules for existing projects
     Project.find(:all).each do |project|
diff --git a/db/migrate/081_create_projects_trackers.rb b/db/migrate/081_create_projects_trackers.rb
index 70fea18..cca41a3 100644
--- a/db/migrate/081_create_projects_trackers.rb
+++ b/db/migrate/081_create_projects_trackers.rb
@@ -4,7 +4,7 @@ class CreateProjectsTrackers < ActiveRecord::Migration
       t.column :project_id, :integer, :default => 0, :null => false
       t.column :tracker_id, :integer, :default => 0, :null => false
     end
-    add_index :projects_trackers, :project_id, :name => :projects_trackers_project_id
+    add_index :projects_trackers, :project_id, :name => ":projects_trackers_project_id"
     
     # Associates all trackers to all projects (as it was before)
     tracker_ids = Tracker.find(:all).collect(&:id)
diff --git a/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb b/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb
index a59135b..7fb7a64 100644
--- a/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb
+++ b/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb
@@ -1,9 +1,9 @@
 class AddRoleTrackerOldStatusIndexToWorkflows < ActiveRecord::Migration
   def self.up
-    add_index :workflows, [:role_id, :tracker_id, :old_status_id], :name => :wkfs_role_tracker_old_status
+    add_index :workflows, [:role_id, :tracker_id, :old_status_id], :name => ":wkfs_role_tracker_old_status"
   end
 
   def self.down
-    remove_index(:workflows, :name => :wkfs_role_tracker_old_status); rescue
+    remove_index(:workflows, :name => ":wkfs_role_tracker_old_status"); rescue
   end
 end
diff --git a/db/migrate/20090214190337_add_watchers_user_id_type_index.rb b/db/migrate/20090214190337_add_watchers_user_id_type_index.rb
index 7ff4e54..7fdcfb4 100644
--- a/db/migrate/20090214190337_add_watchers_user_id_type_index.rb
+++ b/db/migrate/20090214190337_add_watchers_user_id_type_index.rb
@@ -1,9 +1,9 @@
 class AddWatchersUserIdTypeIndex < ActiveRecord::Migration
   def self.up
-    add_index :watchers, [:user_id, :watchable_type], :name => :watchers_user_id_type
+    add_index :watchers, [:user_id, :watchable_type], :name => ":watchers_user_id_type"
   end
 
   def self.down
-    remove_index :watchers, :name => :watchers_user_id_type
+    remove_index :watchers, :name => ":watchers_user_id_type"
   end
 end
diff --git a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb
index 02a8fa6..0b86268 100644
--- a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb
+++ b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb
@@ -1,11 +1,11 @@
 class AddProjectsTrackersUniqueIndex < ActiveRecord::Migration
   def self.up
     remove_duplicates
-    add_index :projects_trackers, [:project_id, :tracker_id], :name => :projects_trackers_unique, :unique => true
+    add_index :projects_trackers, [:project_id, :tracker_id], :name => ":projects_trackers_unique", :unique => true
   end
 
   def self.down
-    remove_index :projects_trackers, :name => :projects_trackers_unique
+    remove_index :projects_trackers, :name => ":projects_trackers_unique"
   end
 
   # Removes duplicates in projects_trackers table
diff --git a/db/migrate/20090704172355_create_groups_users.rb b/db/migrate/20090704172355_create_groups_users.rb
index 9ce03b9..61c554a 100644
--- a/db/migrate/20090704172355_create_groups_users.rb
+++ b/db/migrate/20090704172355_create_groups_users.rb
@@ -4,7 +4,7 @@ class CreateGroupsUsers < ActiveRecord::Migration
       t.column :group_id, :integer, :null => false
       t.column :user_id, :integer, :null => false
     end
-    add_index :groups_users, [:group_id, :user_id], :unique => true, :name => :groups_users_ids
+    add_index :groups_users, [:group_id, :user_id], :unique => true, :name => ":groups_users_ids"
   end
 
   def self.down
diff --git a/db/migrate/20100221100219_add_index_on_changesets_scmid.rb b/db/migrate/20100221100219_add_index_on_changesets_scmid.rb
index 96d85a3..22c8373 100644
--- a/db/migrate/20100221100219_add_index_on_changesets_scmid.rb
+++ b/db/migrate/20100221100219_add_index_on_changesets_scmid.rb
@@ -1,9 +1,9 @@
 class AddIndexOnChangesetsScmid < ActiveRecord::Migration
   def self.up
-    add_index :changesets, [:repository_id, :scmid], :name => :changesets_repos_scmid
+    add_index :changesets, [:repository_id, :scmid], :name => ":changesets_repos_scmid"
   end
 
   def self.down
-    remove_index :changesets, :name => :changesets_repos_scmid
+    remove_index :changesets, :name => ":changesets_repos_scmid"
   end
 end
-- 
1.7.1

