Commit 86f010adfc1095955133ee8540db1f318dbbf1b9

Authored by Antonio Terceiro
1 parent 9f74370b

Force a shorter index name

This fixes a problem that when we are creating the database in
PostgreSQL, there is a crash saying:

  Input string is longer than NAMEDATALEN-1 (63)
db/migrate/20100928000952_aggressive_indexing_strategy2.rb
@@ -31,7 +31,7 @@ class AggressiveIndexingStrategy2 < ActiveRecord::Migration @@ -31,7 +31,7 @@ class AggressiveIndexingStrategy2 < ActiveRecord::Migration
31 execute buffer 31 execute buffer
32 end 32 end
33 33
34 - add_index(:action_tracker_notifications, [:profile_id, :action_tracker_id], :unique => true) 34 + add_index(:action_tracker_notifications, [:profile_id, :action_tracker_id], :unique => true, :name => "index_action_tracker_notif_on_prof_id_act_tracker_id")
35 end 35 end
36 36
37 def self.down 37 def self.down
@@ -41,7 +41,7 @@ ActiveRecord::Schema.define(:version => 20111004184104) do @@ -41,7 +41,7 @@ ActiveRecord::Schema.define(:version => 20111004184104) do
41 end 41 end
42 42
43 add_index "action_tracker_notifications", ["action_tracker_id"], :name => "index_action_tracker_notifications_on_action_tracker_id" 43 add_index "action_tracker_notifications", ["action_tracker_id"], :name => "index_action_tracker_notifications_on_action_tracker_id"
44 - add_index "action_tracker_notifications", ["profile_id", "action_tracker_id"], :name => "index_action_tracker_notifications_on_profile_id_and_action_trac", :unique => true 44 + add_index "action_tracker_notifications", ["profile_id", "action_tracker_id"], :name => "index_action_tracker_notif_on_prof_id_act_tracker_id", :unique => true
45 add_index "action_tracker_notifications", ["profile_id"], :name => "index_action_tracker_notifications_on_profile_id" 45 add_index "action_tracker_notifications", ["profile_id"], :name => "index_action_tracker_notifications_on_profile_id"
46 46
47 create_table "article_versions", :force => true do |t| 47 create_table "article_versions", :force => true do |t|