Commit 84c71e5d authored by Marin Jankovski's avatar Marin Jankovski

Add unique to oid index for lfs object.

parent f445d3d1
class AddUniqueForLfsOidIndex < ActiveRecord::Migration
def change
remove_index :lfs_objects, :oid
remove_index :lfs_objects, [:oid, :size]
add_index :lfs_objects, :oid, unique: true
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20151114113410) do ActiveRecord::Schema.define(version: 20151116144118) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -430,8 +430,7 @@ ActiveRecord::Schema.define(version: 20151114113410) do ...@@ -430,8 +430,7 @@ ActiveRecord::Schema.define(version: 20151114113410) do
t.string "file" t.string "file"
end end
add_index "lfs_objects", ["oid", "size"], name: "index_lfs_objects_on_oid_and_size", using: :btree add_index "lfs_objects", ["oid"], name: "index_lfs_objects_on_oid", unique: true, using: :btree
add_index "lfs_objects", ["oid"], name: "index_lfs_objects_on_oid", using: :btree
create_table "lfs_objects_projects", force: true do |t| create_table "lfs_objects_projects", force: true do |t|
t.integer "lfs_object_id", null: false t.integer "lfs_object_id", null: false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment