|
From: | noreply |
Subject: | [myexperiment-hackers] [2418] trunk/db/migrate/085_add_index_to_profiles_table.rb: Add index for user_id on profiles. |
Date: | Thu, 27 May 2010 08:50:50 -0400 (EDT) |
Add index for user_id on profiles.
--- trunk/db/migrate/085_add_index_to_profiles_table.rb (rev 0)
+++ trunk/db/migrate/085_add_index_to_profiles_table.rb 2010-05-27 12:50:49 UTC (rev 2418)
@@ -0,0 +1,13 @@
+class AddIndexToProfilesTable < ActiveRecord::Migration
+ def self.up
+
+ add_index :profiles, ["user_id"], :name => "index_profiles_on_user_id"
+
+ end
+
+ def self.down
+
+ remove_index :profiles, :name => "index_profiles_on_user_id"
+
+ end
+end
[Prev in Thread] | Current Thread | [Next in Thread] |