diff --git a/db/migrate/20160408214135_index_created_at_on_build_attempts.rb b/db/migrate/20160408214135_index_created_at_on_build_attempts.rb new file mode 100644 index 000000000..6505ea785 --- /dev/null +++ b/db/migrate/20160408214135_index_created_at_on_build_attempts.rb @@ -0,0 +1,5 @@ +class IndexCreatedAtOnBuildAttempts < ActiveRecord::Migration + def change + add_index :build_attempts, :created_at + end +end diff --git a/db/schema.rb b/db/schema.rb index 4899edba9..27ae5e33b 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: 20151114185514) do +ActiveRecord::Schema.define(version: 20160408214135) do create_table "branches", force: :cascade do |t| t.integer "repository_id", limit: 4, null: false @@ -45,6 +45,7 @@ end add_index "build_attempts", ["build_part_id"], name: "index_build_attempts_on_build_part_id", using: :btree + add_index "build_attempts", ["created_at"], name: "index_build_attempts_on_created_at", using: :btree create_table "build_parts", force: :cascade do |t| t.integer "build_id", limit: 4