myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2469] trunk/db/migrate/087_add_indexes_to_viewin


From: noreply
Subject: [myexperiment-hackers] [2469] trunk/db/migrate/087_add_indexes_to_viewings_downloads.rb: added indexes to viewings and downloads
Date: Mon, 12 Jul 2010 08:09:36 -0400 (EDT)

Revision
2469
Author
dgc
Date
2010-07-12 08:09:35 -0400 (Mon, 12 Jul 2010)

Log Message

added indexes to viewings and downloads

Added Paths

Diff

Added: trunk/db/migrate/087_add_indexes_to_viewings_downloads.rb (0 => 2469)


--- trunk/db/migrate/087_add_indexes_to_viewings_downloads.rb	                        (rev 0)
+++ trunk/db/migrate/087_add_indexes_to_viewings_downloads.rb	2010-07-12 12:09:35 UTC (rev 2469)
@@ -0,0 +1,15 @@
+class AddIndexesToViewingsDownloads < ActiveRecord::Migration
+  def self.up
+
+    add_index :viewings, ["contribution_id"]
+    add_index :downloads, ["contribution_id"]
+
+  end
+
+  def self.down
+
+    remove_index :viewings, ["contribution_id"]
+    remove_index :downloads, ["contribution_id"]
+
+  end
+end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]