Add index on Files

This commit is contained in:
Jan Renz
2015-04-21 09:50:23 +02:00
parent 9c8d0b01eb
commit c7583f3eda
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,5 @@
class AddFileIndexToFiles < ActiveRecord::Migration
def change
add_index(:files, [:context_id, :context_type])
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150408155923) do
ActiveRecord::Schema.define(version: 20150421074734) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -123,6 +123,8 @@ ActiveRecord::Schema.define(version: 20150408155923) do
t.string "path"
end
add_index "files", ["context_id", "context_type"], name: "index_files_on_context_id_and_context_type", using: :btree
create_table "hints", force: true do |t|
t.integer "execution_environment_id"
t.string "locale"