diff --git a/db/migrate/20150630071537_add_index_on_replies_msisdn_discovery_id.rb b/db/migrate/20150630071537_add_index_on_replies_msisdn_discovery_id.rb new file mode 100644 index 0000000..b1f3ecf --- /dev/null +++ b/db/migrate/20150630071537_add_index_on_replies_msisdn_discovery_id.rb @@ -0,0 +1,5 @@ +class AddIndexOnRepliesMsisdnDiscoveryId < ActiveRecord::Migration + def change + add_index(:replies, :msisdn_discovery_id) + end +end diff --git a/db/schema.rb b/db/schema.rb index e33c746..a8c4550 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150607062339) do +ActiveRecord::Schema.define(version: 20150630071537) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -177,6 +177,7 @@ end add_index "replies", ["chat_id"], name: "index_replies_on_chat_id", using: :btree + add_index "replies", ["msisdn_discovery_id"], name: "index_replies_on_msisdn_discovery_id", using: :btree add_index "replies", ["state"], name: "index_replies_on_state", using: :btree add_index "replies", ["token"], name: "index_replies_on_token", unique: true, using: :btree add_index "replies", ["user_id"], name: "index_replies_on_user_id", using: :btree