From 3af455103e6918916fac05e3f8d339a03b8ee06d Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 29 Oct 2016 17:41:56 +0200 Subject: [PATCH] New database schema after db:migrate --- db/schema.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index aa54496..da59cf8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,4 +1,3 @@ -# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -39,10 +38,10 @@ ActiveRecord::Schema.define(version: 20160812085722) do t.datetime "created_at" t.datetime "updated_at" t.integer "visits", default: 0 + t.index "(((setweight(to_tsvector('english'::regconfig, COALESCE((name)::text, ''::text)), 'A'::\"char\") || setweight(to_tsvector('english'::regconfig, COALESCE((description)::text, ''::text)), 'B'::\"char\")) || setweight(to_tsvector('english'::regconfig, COALESCE(long_description, ''::text)), 'C'::\"char\")))", name: "packages_fts", using: :gin + t.index ["name"], name: "packages_name_key", unique: true, using: :btree end - add_index "packages", ["name"], name: "packages_name_key", unique: true, using: :btree - create_table "screenshots", force: :cascade do |t| t.integer "package_id" t.string "version", limit: 50 @@ -59,13 +58,14 @@ ActiveRecord::Schema.define(version: 20160812085722) do t.integer "image_file_size" t.datetime "image_updated_at" t.string "image_fingerprint" + t.index ["id", "approved"], name: "id_approved", using: :btree + t.index ["id", "uploaderhash"], name: "id_uploaderhash", using: :btree end - add_index "screenshots", ["id", "approved"], name: "id_approved", using: :btree - add_index "screenshots", ["id", "uploaderhash"], name: "id_uploaderhash", using: :btree - create_table "users", force: :cascade do |t| t.text "realname" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.integer "sign_in_count", default: 0, null: false @@ -76,11 +76,8 @@ ActiveRecord::Schema.define(version: 20160812085722) do t.integer "failed_attempts", default: 0, null: false t.string "unlock_token" t.datetime "locked_at" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.index ["email"], name: "index_users_on_email", unique: true, using: :btree end - add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree - add_foreign_key "screenshots", "packages", name: "screenshots_package_id_fkey" end