diff options
Diffstat (limited to 'db/schema.rb')
| -rw-r--r-- | db/schema.rb | 358 |
1 files changed, 284 insertions, 74 deletions
| diff --git a/db/schema.rb b/db/schema.rb index 0279d8e..74e1976 100644 --- a/db/schema.rb +++ b/db/schema.rb | |||
| @@ -2,27 +2,80 @@ | |||
| 2 | # of editing this file, please use the migrations feature of Active Record to | 2 | # of editing this file, please use the migrations feature of Active Record to |
| 3 | # incrementally modify your database, and then regenerate this schema definition. | 3 | # incrementally modify your database, and then regenerate this schema definition. |
| 4 | # | 4 | # |
| 5 | # Note that this schema.rb definition is the authoritative source for your | 5 | # This file is the source Rails uses to define your schema when running `bin/rails |
| 6 | # database schema. If you need to create the application database on another | 6 | # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to |
| 7 | # system, you should be using db:schema:load, not running all the migrations | 7 | # be faster and is potentially less error prone than running all of your |
| 8 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations | 8 | # migrations from scratch. Old migrations may fail to apply correctly if those |
| 9 | # you'll amass, the slower it'll run and the greater likelihood for issues). | 9 | # migrations use external dependencies or application code. |
| 10 | # | 10 | # |
| 11 | # It's strongly recommended that you check this file into your version control system. | 11 | # It's strongly recommended that you check this file into your version control system. |
| 12 | 12 | ||
| 13 | ActiveRecord::Schema.define(version: 20180704144707) do | 13 | ActiveRecord::Schema[7.1].define(version: 2025_11_22_012500) do |
| 14 | create_table "active_storage_attachments", force: :cascade do |t| | ||
| 15 | t.string "name", null: false | ||
| 16 | t.string "record_type", null: false | ||
| 17 | t.bigint "record_id", null: false | ||
| 18 | t.bigint "blob_id", null: false | ||
| 19 | t.datetime "created_at", null: false | ||
| 20 | t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" | ||
| 21 | t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true | ||
| 22 | end | ||
| 23 | |||
| 24 | create_table "active_storage_blobs", force: :cascade do |t| | ||
| 25 | t.string "key", null: false | ||
| 26 | t.string "filename", null: false | ||
| 27 | t.string "content_type" | ||
| 28 | t.text "metadata" | ||
| 29 | t.string "service_name", null: false | ||
| 30 | t.bigint "byte_size", null: false | ||
| 31 | t.string "checksum" | ||
| 32 | t.datetime "created_at", null: false | ||
| 33 | t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true | ||
| 34 | end | ||
| 14 | 35 | ||
| 15 | create_table "blogs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 36 | create_table "active_storage_variant_records", force: :cascade do |t| |
| 37 | t.bigint "blob_id", null: false | ||
| 38 | t.string "variation_digest", null: false | ||
| 39 | t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true | ||
| 40 | end | ||
| 41 | |||
| 42 | create_table "audits", force: :cascade do |t| | ||
| 43 | t.integer "auditable_id" | ||
| 44 | t.string "auditable_type" | ||
| 45 | t.integer "associated_id" | ||
| 46 | t.string "associated_type" | ||
| 47 | t.integer "user_id" | ||
| 48 | t.string "user_type" | ||
| 49 | t.string "username" | ||
| 50 | t.string "action" | ||
| 51 | t.text "audited_changes" | ||
| 52 | t.integer "version", default: 0 | ||
| 53 | t.string "comment" | ||
| 54 | t.string "remote_address" | ||
| 55 | t.string "request_uuid" | ||
| 56 | t.datetime "created_at", precision: nil | ||
| 57 | t.index ["associated_type", "associated_id"], name: "associated_index" | ||
| 58 | t.index ["auditable_type", "auditable_id", "version"], name: "auditable_index" | ||
| 59 | t.index ["created_at"], name: "index_audits_on_created_at" | ||
| 60 | t.index ["request_uuid"], name: "index_audits_on_request_uuid" | ||
| 61 | t.index ["user_id", "user_type"], name: "user_index" | ||
| 62 | end | ||
| 63 | |||
| 64 | create_table "blogs", force: :cascade do |t| | ||
| 16 | t.string "title" | 65 | t.string "title" |
| 17 | t.text "body" | 66 | t.text "body", limit: 16777215 |
| 18 | t.string "slug" | 67 | t.string "slug" |
| 19 | t.datetime "created_at", null: false | 68 | t.datetime "created_at", precision: nil, null: false |
| 20 | t.datetime "updated_at", null: false | 69 | t.datetime "updated_at", precision: nil, null: false |
| 21 | t.boolean "published", default: false, null: false | 70 | t.boolean "published", default: false, null: false |
| 22 | t.datetime "published_at" | 71 | t.datetime "published_at", precision: nil |
| 72 | t.integer "user_id" | ||
| 73 | t.integer "upvotes", default: 0, null: false | ||
| 74 | t.integer "downvotes", default: 0, null: false | ||
| 75 | t.index ["user_id"], name: "index_blogs_on_user_id" | ||
| 23 | end | 76 | end |
| 24 | 77 | ||
| 25 | create_table "ckeditor_assets", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 78 | create_table "ckeditor_assets", force: :cascade do |t| |
| 26 | t.string "data_file_name", null: false | 79 | t.string "data_file_name", null: false |
| 27 | t.string "data_content_type" | 80 | t.string "data_content_type" |
| 28 | t.integer "data_file_size" | 81 | t.integer "data_file_size" |
| @@ -30,48 +83,102 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 30 | t.string "type", limit: 30 | 83 | t.string "type", limit: 30 |
| 31 | t.integer "width" | 84 | t.integer "width" |
| 32 | t.integer "height" | 85 | t.integer "height" |
| 86 | t.datetime "created_at", precision: nil, null: false | ||
| 87 | t.datetime "updated_at", precision: nil, null: false | ||
| 88 | t.index ["type"], name: "index_ckeditor_assets_on_type" | ||
| 89 | end | ||
| 90 | |||
| 91 | create_table "comments", force: :cascade do |t| | ||
| 92 | t.integer "blog_id", null: false | ||
| 93 | t.string "username" | ||
| 94 | t.string "email" | ||
| 95 | t.string "website" | ||
| 96 | t.text "body" | ||
| 97 | t.string "status" | ||
| 98 | t.datetime "published_at" | ||
| 33 | t.datetime "created_at", null: false | 99 | t.datetime "created_at", null: false |
| 34 | t.datetime "updated_at", null: false | 100 | t.datetime "updated_at", null: false |
| 35 | t.index ["type"], name: "index_ckeditor_assets_on_type" | 101 | t.integer "reply_to_id" |
| 102 | t.string "request_ip" | ||
| 103 | t.string "user_agent" | ||
| 104 | t.string "referrer" | ||
| 105 | t.index ["blog_id"], name: "index_comments_on_blog_id" | ||
| 106 | t.index ["reply_to_id"], name: "index_comments_on_reply_to_id" | ||
| 36 | end | 107 | end |
| 37 | 108 | ||
| 38 | create_table "pokeviewer_abilities", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 109 | create_table "games", force: :cascade do |t| |
| 39 | t.string "name", null: false | 110 | t.string "title" |
| 40 | t.string "description", null: false | 111 | t.string "status" |
| 112 | t.text "progress" | ||
| 113 | t.text "description" | ||
| 114 | t.integer "score" | ||
| 115 | t.datetime "created_at", precision: nil, null: false | ||
| 116 | t.datetime "updated_at", precision: nil, null: false | ||
| 117 | t.date "started_on" | ||
| 118 | t.date "finished_on" | ||
| 119 | end | ||
| 120 | |||
| 121 | create_table "globals", force: :cascade do |t| | ||
| 122 | t.string "key" | ||
| 123 | t.string "string_value" | ||
| 124 | t.integer "int_value" | ||
| 41 | t.datetime "created_at", null: false | 125 | t.datetime "created_at", null: false |
| 42 | t.datetime "updated_at", null: false | 126 | t.datetime "updated_at", null: false |
| 43 | t.index ["name"], name: "index_pokeviewer_abilities_on_name", unique: true | ||
| 44 | end | 127 | end |
| 45 | 128 | ||
| 46 | create_table "pokeviewer_gift_ribbons", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 129 | create_table "lingo_scores", force: :cascade do |t| |
| 47 | t.string "description", null: false | 130 | t.integer "user_id", limit: 8 |
| 131 | t.string "username" | ||
| 132 | t.string "avatar_url" | ||
| 133 | t.integer "score" | ||
| 48 | t.datetime "created_at", null: false | 134 | t.datetime "created_at", null: false |
| 49 | t.datetime "updated_at", null: false | 135 | t.datetime "updated_at", null: false |
| 50 | end | 136 | end |
| 51 | 137 | ||
| 52 | create_table "pokeviewer_items", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 138 | create_table "links", force: :cascade do |t| |
| 139 | t.string "title", null: false | ||
| 140 | t.string "url", null: false | ||
| 141 | t.datetime "created_at", precision: nil, null: false | ||
| 142 | t.datetime "updated_at", precision: nil, null: false | ||
| 143 | end | ||
| 144 | |||
| 145 | create_table "pokeviewer_abilities", force: :cascade do |t| | ||
| 146 | t.string "name", limit: 191, null: false | ||
| 147 | t.string "description", null: false | ||
| 148 | t.datetime "created_at", precision: nil, null: false | ||
| 149 | t.datetime "updated_at", precision: nil, null: false | ||
| 150 | t.index ["name"], name: "index_pokeviewer_abilities_on_name", unique: true | ||
| 151 | end | ||
| 152 | |||
| 153 | create_table "pokeviewer_gift_ribbons", force: :cascade do |t| | ||
| 154 | t.string "description", null: false | ||
| 155 | t.datetime "created_at", precision: nil, null: false | ||
| 156 | t.datetime "updated_at", precision: nil, null: false | ||
| 157 | end | ||
| 158 | |||
| 159 | create_table "pokeviewer_items", force: :cascade do |t| | ||
| 53 | t.string "name", null: false | 160 | t.string "name", null: false |
| 54 | t.boolean "tm", default: false, null: false | 161 | t.boolean "tm", default: false, null: false |
| 55 | t.integer "move_id" | 162 | t.integer "move_id" |
| 56 | t.string "rs_description" | 163 | t.string "rs_description" |
| 57 | t.string "frlg_description" | 164 | t.string "frlg_description" |
| 58 | t.string "emerald_description" | 165 | t.string "emerald_description" |
| 59 | t.datetime "created_at", null: false | 166 | t.datetime "created_at", precision: nil, null: false |
| 60 | t.datetime "updated_at", null: false | 167 | t.datetime "updated_at", precision: nil, null: false |
| 61 | t.index ["move_id"], name: "index_pokeviewer_items_on_move_id" | 168 | t.index ["move_id"], name: "index_pokeviewer_items_on_move_id" |
| 62 | end | 169 | end |
| 63 | 170 | ||
| 64 | create_table "pokeviewer_locations", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 171 | create_table "pokeviewer_locations", force: :cascade do |t| |
| 65 | t.string "name", null: false | 172 | t.string "name", null: false |
| 66 | t.datetime "created_at", null: false | 173 | t.datetime "created_at", precision: nil, null: false |
| 67 | t.datetime "updated_at", null: false | 174 | t.datetime "updated_at", precision: nil, null: false |
| 68 | end | 175 | end |
| 69 | 176 | ||
| 70 | create_table "pokeviewer_moves", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 177 | create_table "pokeviewer_moves", force: :cascade do |t| |
| 71 | t.string "name", null: false | 178 | t.string "name", limit: 191, null: false |
| 72 | t.integer "pp", null: false | 179 | t.integer "pp", null: false |
| 73 | t.datetime "created_at", null: false | 180 | t.datetime "created_at", precision: nil, null: false |
| 74 | t.datetime "updated_at", null: false | 181 | t.datetime "updated_at", precision: nil, null: false |
| 75 | t.string "move_type", null: false | 182 | t.string "move_type", null: false |
| 76 | t.string "rs_description", null: false | 183 | t.string "rs_description", null: false |
| 77 | t.string "frlg_description", null: false | 184 | t.string "frlg_description", null: false |
| @@ -79,21 +186,21 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 79 | t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true | 186 | t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true |
| 80 | end | 187 | end |
| 81 | 188 | ||
| 82 | create_table "pokeviewer_pokedex_entries", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 189 | create_table "pokeviewer_pokedex_entries", force: :cascade do |t| |
| 83 | t.bigint "trainer_id" | 190 | t.integer "trainer_id" |
| 84 | t.bigint "species_id" | 191 | t.integer "species_id" |
| 85 | t.boolean "caught", default: false | 192 | t.boolean "caught", default: false |
| 86 | t.datetime "created_at", null: false | 193 | t.datetime "created_at", precision: nil, null: false |
| 87 | t.datetime "updated_at", null: false | 194 | t.datetime "updated_at", precision: nil, null: false |
| 88 | t.index ["species_id"], name: "index_pokeviewer_pokedex_entries_on_species_id" | 195 | t.index ["species_id"], name: "index_pokeviewer_pokedex_entries_on_species_id" |
| 89 | t.index ["trainer_id", "species_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id_and_species_id", unique: true | 196 | t.index ["trainer_id", "species_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id_and_species_id", unique: true |
| 90 | t.index ["trainer_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id" | 197 | t.index ["trainer_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id" |
| 91 | end | 198 | end |
| 92 | 199 | ||
| 93 | create_table "pokeviewer_pokemon", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 200 | create_table "pokeviewer_pokemon", force: :cascade do |t| |
| 94 | t.string "uuid", null: false | 201 | t.string "uuid", limit: 191, null: false |
| 95 | t.integer "trainer_id" | 202 | t.integer "trainer_id" |
| 96 | t.string "key" | 203 | t.string "key", limit: 191 |
| 97 | t.string "ot_name", null: false | 204 | t.string "ot_name", null: false |
| 98 | t.integer "ot_number", null: false | 205 | t.integer "ot_number", null: false |
| 99 | t.string "met_type", null: false | 206 | t.string "met_type", null: false |
| @@ -103,21 +210,22 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 103 | t.string "gender", null: false | 210 | t.string "gender", null: false |
| 104 | t.boolean "second_ability", null: false | 211 | t.boolean "second_ability", null: false |
| 105 | t.string "unown_letter", limit: 1 | 212 | t.string "unown_letter", limit: 1 |
| 106 | t.datetime "created_at", null: false | 213 | t.datetime "created_at", precision: nil, null: false |
| 107 | t.datetime "updated_at", null: false | 214 | t.datetime "updated_at", precision: nil, null: false |
| 108 | t.string "ot_gender", default: "", null: false | 215 | t.string "ot_gender", default: "", null: false |
| 109 | t.integer "box" | 216 | t.integer "box" |
| 110 | t.integer "slot" | 217 | t.integer "slot" |
| 111 | t.integer "location_id" | 218 | t.integer "location_id" |
| 112 | t.string "pokeball", null: false | 219 | t.string "pokeball", null: false |
| 113 | t.bigint "current_id" | 220 | t.integer "current_id" |
| 114 | t.index ["current_id"], name: "index_pokeviewer_pokemon_on_current_id" | 221 | t.index ["current_id"], name: "index_pokeviewer_pokemon_on_current_id" |
| 115 | t.index ["key"], name: "index_pokeviewer_pokemon_on_key", unique: true | 222 | t.index ["key"], name: "index_pokeviewer_pokemon_on_key", unique: true |
| 223 | t.index ["location_id"], name: "index_pokeviewer_pokemon_on_location_id" | ||
| 116 | t.index ["trainer_id"], name: "index_pokeviewer_pokemon_on_trainer_id" | 224 | t.index ["trainer_id"], name: "index_pokeviewer_pokemon_on_trainer_id" |
| 117 | t.index ["uuid"], name: "index_pokeviewer_pokemon_on_uuid", unique: true | 225 | t.index ["uuid"], name: "index_pokeviewer_pokemon_on_uuid", unique: true |
| 118 | end | 226 | end |
| 119 | 227 | ||
| 120 | create_table "pokeviewer_revisions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 228 | create_table "pokeviewer_revisions", force: :cascade do |t| |
| 121 | t.integer "pokemon_id", null: false | 229 | t.integer "pokemon_id", null: false |
| 122 | t.integer "sequential_id", null: false | 230 | t.integer "sequential_id", null: false |
| 123 | t.string "nickname", null: false | 231 | t.string "nickname", null: false |
| @@ -135,7 +243,6 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 135 | t.integer "smartness", null: false | 243 | t.integer "smartness", null: false |
| 136 | t.integer "toughness", null: false | 244 | t.integer "toughness", null: false |
| 137 | t.integer "sheen", null: false | 245 | t.integer "sheen", null: false |
| 138 | t.integer "item_id" | ||
| 139 | t.integer "move_1_id", null: false | 246 | t.integer "move_1_id", null: false |
| 140 | t.integer "move_2_id" | 247 | t.integer "move_2_id" |
| 141 | t.integer "move_3_id" | 248 | t.integer "move_3_id" |
| @@ -144,8 +251,8 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 144 | t.integer "move_2_pp_bonuses", default: 0, null: false | 251 | t.integer "move_2_pp_bonuses", default: 0, null: false |
| 145 | t.integer "move_3_pp_bonuses", default: 0, null: false | 252 | t.integer "move_3_pp_bonuses", default: 0, null: false |
| 146 | t.integer "move_4_pp_bonuses", default: 0, null: false | 253 | t.integer "move_4_pp_bonuses", default: 0, null: false |
| 147 | t.datetime "created_at", null: false | 254 | t.datetime "created_at", precision: nil, null: false |
| 148 | t.datetime "updated_at", null: false | 255 | t.datetime "updated_at", precision: nil, null: false |
| 149 | t.integer "cool_ribbons", default: 0, null: false | 256 | t.integer "cool_ribbons", default: 0, null: false |
| 150 | t.integer "beauty_ribbons", default: 0, null: false | 257 | t.integer "beauty_ribbons", default: 0, null: false |
| 151 | t.integer "cute_ribbons", default: 0, null: false | 258 | t.integer "cute_ribbons", default: 0, null: false |
| @@ -163,7 +270,9 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 163 | t.boolean "national_ribbon", default: false | 270 | t.boolean "national_ribbon", default: false |
| 164 | t.boolean "earth_ribbon", default: false | 271 | t.boolean "earth_ribbon", default: false |
| 165 | t.boolean "world_ribbon", default: false | 272 | t.boolean "world_ribbon", default: false |
| 166 | t.bigint "species_id", null: false | 273 | t.integer "item_id" |
| 274 | t.integer "species_id", null: false | ||
| 275 | t.index ["item_id"], name: "index_pokeviewer_revisions_on_item_id" | ||
| 167 | t.index ["move_1_id"], name: "index_pokeviewer_revisions_on_move_1_id" | 276 | t.index ["move_1_id"], name: "index_pokeviewer_revisions_on_move_1_id" |
| 168 | t.index ["move_2_id"], name: "index_pokeviewer_revisions_on_move_2_id" | 277 | t.index ["move_2_id"], name: "index_pokeviewer_revisions_on_move_2_id" |
| 169 | t.index ["move_3_id"], name: "index_pokeviewer_revisions_on_move_3_id" | 278 | t.index ["move_3_id"], name: "index_pokeviewer_revisions_on_move_3_id" |
| @@ -173,23 +282,25 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 173 | t.index ["species_id"], name: "index_pokeviewer_revisions_on_species_id" | 282 | t.index ["species_id"], name: "index_pokeviewer_revisions_on_species_id" |
| 174 | end | 283 | end |
| 175 | 284 | ||
| 176 | create_table "pokeviewer_species", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 285 | create_table "pokeviewer_species", force: :cascade do |t| |
| 177 | t.string "name", null: false | 286 | t.string "name", limit: 191, null: false |
| 178 | t.datetime "created_at", null: false | 287 | t.datetime "created_at", precision: nil, null: false |
| 179 | t.datetime "updated_at", null: false | 288 | t.datetime "updated_at", precision: nil, null: false |
| 180 | t.string "type_1", null: false | 289 | t.string "type_1", null: false |
| 181 | t.string "type_2" | 290 | t.string "type_2" |
| 182 | t.integer "ability_1_id", null: false | 291 | t.integer "ability_1_id", null: false |
| 183 | t.integer "ability_2_id" | 292 | t.integer "ability_2_id" |
| 293 | t.index ["ability_1_id"], name: "index_pokeviewer_species_on_ability_1_id" | ||
| 294 | t.index ["ability_2_id"], name: "index_pokeviewer_species_on_ability_2_id" | ||
| 184 | t.index ["name"], name: "index_pokeviewer_species_on_name", unique: true | 295 | t.index ["name"], name: "index_pokeviewer_species_on_name", unique: true |
| 185 | end | 296 | end |
| 186 | 297 | ||
| 187 | create_table "pokeviewer_trainers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 298 | create_table "pokeviewer_trainers", force: :cascade do |t| |
| 188 | t.string "game", null: false | 299 | t.string "game", null: false |
| 189 | t.string "name", null: false | 300 | t.string "name", limit: 191, null: false |
| 190 | t.integer "number", null: false | 301 | t.integer "number", null: false |
| 191 | t.datetime "created_at", null: false | 302 | t.datetime "created_at", precision: nil, null: false |
| 192 | t.datetime "updated_at", null: false | 303 | t.datetime "updated_at", precision: nil, null: false |
| 193 | t.integer "marine_ribbon_id" | 304 | t.integer "marine_ribbon_id" |
| 194 | t.integer "land_ribbon_id" | 305 | t.integer "land_ribbon_id" |
| 195 | t.integer "sky_ribbon_id" | 306 | t.integer "sky_ribbon_id" |
| @@ -221,55 +332,154 @@ ActiveRecord::Schema.define(version: 20180704144707) do | |||
| 221 | t.index ["world_ribbon_id"], name: "index_pokeviewer_trainers_on_world_ribbon_id" | 332 | t.index ["world_ribbon_id"], name: "index_pokeviewer_trainers_on_world_ribbon_id" |
| 222 | end | 333 | end |
| 223 | 334 | ||
| 224 | create_table "records", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 335 | create_table "quotes", force: :cascade do |t| |
| 336 | t.text "content", null: false | ||
| 337 | t.string "state", null: false | ||
| 338 | t.string "submitter" | ||
| 339 | t.text "notes", null: false | ||
| 340 | t.integer "upvotes", default: 0, null: false | ||
| 341 | t.integer "downvotes", default: 0, null: false | ||
| 342 | t.datetime "created_at", null: false | ||
| 343 | t.datetime "updated_at", null: false | ||
| 344 | end | ||
| 345 | |||
| 346 | create_table "records", force: :cascade do |t| | ||
| 225 | t.text "description" | 347 | t.text "description" |
| 226 | t.string "recordable_type" | 348 | t.string "recordable_type", limit: 191 |
| 227 | t.integer "recordable_id" | 349 | t.integer "recordable_id" |
| 350 | t.datetime "created_at", precision: nil, null: false | ||
| 351 | t.datetime "updated_at", precision: nil, null: false | ||
| 352 | t.index ["recordable_type", "recordable_id"], name: "index_records_on_recordable_type_and_recordable_id" | ||
| 353 | end | ||
| 354 | |||
| 355 | create_table "scrobbles", force: :cascade do |t| | ||
| 356 | t.string "title" | ||
| 357 | t.string "artist" | ||
| 358 | t.string "album" | ||
| 359 | t.string "image" | ||
| 228 | t.datetime "created_at", null: false | 360 | t.datetime "created_at", null: false |
| 229 | t.datetime "updated_at", null: false | 361 | t.datetime "updated_at", null: false |
| 230 | t.index ["recordable_type", "recordable_id"], name: "index_records_on_recordable_type_and_recordable_id" | ||
| 231 | end | 362 | end |
| 232 | 363 | ||
| 233 | create_table "streams", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t| | 364 | create_table "streams", force: :cascade do |t| |
| 234 | t.string "title" | 365 | t.string "title" |
| 235 | t.text "body" | 366 | t.text "body" |
| 236 | t.string "slug" | 367 | t.string "slug" |
| 237 | t.datetime "created_at", null: false | 368 | t.datetime "created_at", precision: nil, null: false |
| 238 | t.datetime "updated_at", null: false | 369 | t.datetime "updated_at", precision: nil, null: false |
| 370 | t.datetime "latest_post_at", null: false | ||
| 371 | end | ||
| 372 | |||
| 373 | create_table "taggings", force: :cascade do |t| | ||
| 374 | t.integer "tag_id" | ||
| 375 | t.string "taggable_type" | ||
| 376 | t.integer "taggable_id" | ||
| 377 | t.string "tagger_type" | ||
| 378 | t.integer "tagger_id" | ||
| 379 | t.string "context", limit: 128 | ||
| 380 | t.datetime "created_at", precision: nil | ||
| 381 | t.index ["context"], name: "index_taggings_on_context" | ||
| 382 | t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true | ||
| 383 | t.index ["tag_id"], name: "index_taggings_on_tag_id" | ||
| 384 | t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context" | ||
| 385 | t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy" | ||
| 386 | t.index ["taggable_id"], name: "index_taggings_on_taggable_id" | ||
| 387 | t.index ["taggable_type"], name: "index_taggings_on_taggable_type" | ||
| 388 | t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type" | ||
| 389 | t.index ["tagger_id"], name: "index_taggings_on_tagger_id" | ||
| 390 | end | ||
| 391 | |||
| 392 | create_table "tags", force: :cascade do |t| | ||
| 393 | t.string "name" | ||
| 394 | t.integer "taggings_count", default: 0 | ||
| 395 | t.index ["name"], name: "index_tags_on_name", unique: true | ||
| 239 | end | 396 | end |
| 240 | 397 | ||
| 241 | create_table "updates", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t| | 398 | create_table "updates", force: :cascade do |t| |
| 242 | t.bigint "stream_id" | 399 | t.integer "stream_id" |
| 243 | t.text "body" | 400 | t.text "body" |
| 244 | t.datetime "created_at", null: false | 401 | t.datetime "created_at", precision: nil, null: false |
| 245 | t.datetime "updated_at", null: false | 402 | t.datetime "updated_at", precision: nil, null: false |
| 246 | t.index ["stream_id"], name: "index_updates_on_stream_id" | 403 | t.index ["stream_id"], name: "index_updates_on_stream_id" |
| 247 | end | 404 | end |
| 248 | 405 | ||
| 249 | create_table "users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| | 406 | create_table "users", force: :cascade do |t| |
| 250 | t.string "login", default: "", null: false | 407 | t.string "login", limit: 191, default: "", null: false |
| 251 | t.string "email", default: "", null: false | 408 | t.string "email", limit: 191, default: "", null: false |
| 252 | t.string "encrypted_password", default: "", null: false | 409 | t.string "encrypted_password", default: "", null: false |
| 253 | t.string "reset_password_token" | 410 | t.string "reset_password_token", limit: 191 |
| 254 | t.datetime "reset_password_sent_at" | 411 | t.datetime "reset_password_sent_at", precision: nil |
| 255 | t.datetime "remember_created_at" | 412 | t.datetime "remember_created_at", precision: nil |
| 256 | t.integer "sign_in_count", default: 0, null: false | 413 | t.integer "sign_in_count", default: 0, null: false |
| 257 | t.datetime "current_sign_in_at" | 414 | t.datetime "current_sign_in_at", precision: nil |
| 258 | t.datetime "last_sign_in_at" | 415 | t.datetime "last_sign_in_at", precision: nil |
| 259 | t.string "current_sign_in_ip" | 416 | t.string "current_sign_in_ip" |
| 260 | t.string "last_sign_in_ip" | 417 | t.string "last_sign_in_ip" |
| 261 | t.datetime "created_at", null: false | 418 | t.datetime "created_at", precision: nil, null: false |
| 262 | t.datetime "updated_at", null: false | 419 | t.datetime "updated_at", precision: nil, null: false |
| 263 | t.string "pokeviewer_token" | 420 | t.string "pokeviewer_token", limit: 191 |
| 264 | t.index ["email"], name: "index_users_on_email", unique: true | 421 | t.index ["email"], name: "index_users_on_email", unique: true |
| 265 | t.index ["login"], name: "index_users_on_login", unique: true | 422 | t.index ["login"], name: "index_users_on_login", unique: true |
| 266 | t.index ["pokeviewer_token"], name: "index_users_on_pokeviewer_token", unique: true | 423 | t.index ["pokeviewer_token"], name: "index_users_on_pokeviewer_token", unique: true |
| 267 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true | 424 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true |
| 268 | end | 425 | end |
| 269 | 426 | ||
| 427 | create_table "votes", force: :cascade do |t| | ||
| 428 | t.string "votable_type" | ||
| 429 | t.integer "votable_id" | ||
| 430 | t.integer "upvote" | ||
| 431 | t.string "ip" | ||
| 432 | t.datetime "created_at", null: false | ||
| 433 | t.datetime "updated_at", null: false | ||
| 434 | t.string "liker_url" | ||
| 435 | t.string "liker_name" | ||
| 436 | t.index ["votable_type", "votable_id"], name: "index_votes_on_votable" | ||
| 437 | end | ||
| 438 | |||
| 439 | create_table "wittle_puzzles", force: :cascade do |t| | ||
| 440 | t.text "data" | ||
| 441 | t.text "solved_data" | ||
| 442 | t.string "category" | ||
| 443 | t.datetime "created_at", null: false | ||
| 444 | t.datetime "updated_at", null: false | ||
| 445 | end | ||
| 446 | |||
| 447 | create_table "wittle_scores", force: :cascade do |t| | ||
| 448 | t.integer "puzzle_id", null: false | ||
| 449 | t.string "name" | ||
| 450 | t.string "ip" | ||
| 451 | t.integer "seconds_taken" | ||
| 452 | t.datetime "created_at", null: false | ||
| 453 | t.datetime "updated_at", null: false | ||
| 454 | t.index ["puzzle_id"], name: "index_wittle_scores_on_puzzle_id" | ||
| 455 | end | ||
| 456 | |||
| 457 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" | ||
| 458 | add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" | ||
| 459 | add_foreign_key "blogs", "users" | ||
| 460 | add_foreign_key "comments", "blogs" | ||
| 461 | add_foreign_key "comments", "comments", column: "reply_to_id" | ||
| 462 | add_foreign_key "pokeviewer_items", "pokeviewer_moves", column: "move_id" | ||
| 270 | add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_species", column: "species_id" | 463 | add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_species", column: "species_id" |
| 271 | add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_trainers", column: "trainer_id" | 464 | add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_trainers", column: "trainer_id" |
| 465 | add_foreign_key "pokeviewer_pokemon", "pokeviewer_locations", column: "location_id" | ||
| 272 | add_foreign_key "pokeviewer_pokemon", "pokeviewer_revisions", column: "current_id" | 466 | add_foreign_key "pokeviewer_pokemon", "pokeviewer_revisions", column: "current_id" |
| 467 | add_foreign_key "pokeviewer_pokemon", "pokeviewer_trainers", column: "trainer_id" | ||
| 468 | add_foreign_key "pokeviewer_revisions", "pokeviewer_items", column: "item_id" | ||
| 469 | add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_1_id" | ||
| 470 | add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_2_id" | ||
| 471 | add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_3_id" | ||
| 472 | add_foreign_key "pokeviewer_revisions", "pokeviewer_moves", column: "move_4_id" | ||
| 473 | add_foreign_key "pokeviewer_revisions", "pokeviewer_pokemon", column: "pokemon_id" | ||
| 273 | add_foreign_key "pokeviewer_revisions", "pokeviewer_species", column: "species_id" | 474 | add_foreign_key "pokeviewer_revisions", "pokeviewer_species", column: "species_id" |
| 475 | add_foreign_key "pokeviewer_species", "pokeviewer_abilities", column: "ability_1_id" | ||
| 476 | add_foreign_key "pokeviewer_species", "pokeviewer_abilities", column: "ability_2_id" | ||
| 477 | add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "country_ribbon_id" | ||
| 478 | add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "earth_ribbon_id" | ||
| 479 | add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "land_ribbon_id" | ||
| 480 | add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "marine_ribbon_id" | ||
| 481 | add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "national_ribbon_id" | ||
| 482 | add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "sky_ribbon_id" | ||
| 483 | add_foreign_key "pokeviewer_trainers", "pokeviewer_gift_ribbons", column: "world_ribbon_id" | ||
| 274 | add_foreign_key "updates", "streams" | 484 | add_foreign_key "updates", "streams" |
| 275 | end | 485 | end |
