mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Add index to category photo link table
This commit is contained in:
parent
a988009aa2
commit
4b556719be
@ -0,0 +1,5 @@
|
|||||||
|
class AddIndexToCategoriesPhotos < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_index :categories_photos, [:category_id, :photo_id], unique: true
|
||||||
|
end
|
||||||
|
end
|
||||||
13
db/schema.rb
13
db/schema.rb
@ -11,18 +11,18 @@
|
|||||||
#
|
#
|
||||||
# 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: 20140308082639) do
|
ActiveRecord::Schema.define(version: 20150827205816) 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"
|
||||||
|
|
||||||
create_table "admin_users", force: true do |t|
|
create_table "admin_users", force: true do |t|
|
||||||
t.string "email", default: "", null: false
|
t.string "email", default: "", null: false
|
||||||
t.string "encrypted_password", default: "", null: false
|
t.string "encrypted_password", limit: 128, default: "", null: false
|
||||||
t.string "reset_password_token"
|
t.string "reset_password_token"
|
||||||
t.datetime "reset_password_sent_at"
|
t.datetime "reset_password_sent_at"
|
||||||
t.datetime "remember_created_at"
|
t.datetime "remember_created_at"
|
||||||
t.integer "sign_in_count", default: 0
|
t.integer "sign_in_count", default: 0
|
||||||
t.datetime "current_sign_in_at"
|
t.datetime "current_sign_in_at"
|
||||||
t.datetime "last_sign_in_at"
|
t.datetime "last_sign_in_at"
|
||||||
t.string "current_sign_in_ip"
|
t.string "current_sign_in_ip"
|
||||||
@ -30,8 +30,7 @@ ActiveRecord::Schema.define(version: 20140308082639) do
|
|||||||
t.string "confirmation_token"
|
t.string "confirmation_token"
|
||||||
t.datetime "confirmed_at"
|
t.datetime "confirmed_at"
|
||||||
t.datetime "confirmation_sent_at"
|
t.datetime "confirmation_sent_at"
|
||||||
t.string "unconfirmed_email"
|
t.integer "failed_attempts", default: 0
|
||||||
t.integer "failed_attempts", default: 0
|
|
||||||
t.string "unlock_token"
|
t.string "unlock_token"
|
||||||
t.datetime "locked_at"
|
t.datetime "locked_at"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
@ -59,6 +58,8 @@ ActiveRecord::Schema.define(version: 20140308082639) do
|
|||||||
t.integer "photo_id"
|
t.integer "photo_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
add_index "categories_photos", ["category_id", "photo_id"], name: "index_categories_photos_on_category_id_and_photo_id", unique: true, using: :btree
|
||||||
|
|
||||||
create_table "pages", force: true do |t|
|
create_table "pages", force: true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "title"
|
t.string "title"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user