changeset 221:0f9f29274663

Add index to pastes.secret
author Edho Arief <edho@myconan.net>
date Sun, 12 May 2013 12:25:27 +0900
parents 183e8560a337
children 9bc35555d3e3
files db/migrate/20130512032335_add_index_to_pastes_secret.rb db/schema.rb
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/db/migrate/20130512032335_add_index_to_pastes_secret.rb	Sun May 12 12:25:27 2013 +0900
@@ -0,0 +1,5 @@
+class AddIndexToPastesSecret < ActiveRecord::Migration
+  def change
+    add_index :pastes, :secret
+  end
+end
--- a/db/schema.rb	Sun May 12 12:05:08 2013 +0900
+++ b/db/schema.rb	Sun May 12 12:25:27 2013 +0900
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 20130511133450) do
+ActiveRecord::Schema.define(version: 20130512032335) do
 
   create_table "pastes", force: true do |t|
     t.string   "ip",         limit: 50,  null: false
@@ -24,5 +24,6 @@
   end
 
   add_index "pastes", ["ip", "paste_hash"], name: "index_pastes_on_ip_and_hash", unique: true, using: :btree
+  add_index "pastes", ["secret"], name: "index_pastes_on_secret", using: :btree
 
 end