diff options
Diffstat (limited to 'db/schema.rb')
| -rw-r--r-- | db/schema.rb | 201 |
1 files changed, 201 insertions, 0 deletions
| diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..3555f5f --- /dev/null +++ b/db/schema.rb | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | # This file is auto-generated from the current state of the database. Instead | ||
| 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. | ||
| 4 | # | ||
| 5 | # Note that this schema.rb definition is the authoritative source for your | ||
| 6 | # database schema. If you need to create the application database on another | ||
| 7 | # system, you should be using db:schema:load, not running all the migrations | ||
| 8 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations | ||
| 9 | # you'll amass, the slower it'll run and the greater likelihood for issues). | ||
| 10 | # | ||
| 11 | # It's strongly recommended that you check this file into your version control system. | ||
| 12 | |||
| 13 | ActiveRecord::Schema.define(version: 20180129213822) do | ||
| 14 | |||
| 15 | create_table "abilities", force: :cascade do |t| | ||
| 16 | t.string "name", limit: 191, null: false | ||
| 17 | t.string "description", null: false | ||
| 18 | t.datetime "created_at", null: false | ||
| 19 | t.datetime "updated_at", null: false | ||
| 20 | t.index ["name"], name: "index_abilities_on_name", unique: true | ||
| 21 | end | ||
| 22 | |||
| 23 | create_table "gift_ribbons", force: :cascade do |t| | ||
| 24 | t.string "description", null: false | ||
| 25 | t.datetime "created_at", null: false | ||
| 26 | t.datetime "updated_at", null: false | ||
| 27 | end | ||
| 28 | |||
| 29 | create_table "items", force: :cascade do |t| | ||
| 30 | t.string "name", null: false | ||
| 31 | t.boolean "tm", default: false, null: false | ||
| 32 | t.integer "move_id" | ||
| 33 | t.string "rs_description" | ||
| 34 | t.string "frlg_description" | ||
| 35 | t.string "emerald_description" | ||
| 36 | t.datetime "created_at", null: false | ||
| 37 | t.datetime "updated_at", null: false | ||
| 38 | t.index ["move_id"], name: "index_items_on_move_id" | ||
| 39 | end | ||
| 40 | |||
| 41 | create_table "locations", force: :cascade do |t| | ||
| 42 | t.string "name", null: false | ||
| 43 | t.datetime "created_at", null: false | ||
| 44 | t.datetime "updated_at", null: false | ||
| 45 | end | ||
| 46 | |||
| 47 | create_table "moves", force: :cascade do |t| | ||
| 48 | t.string "name", limit: 191, null: false | ||
| 49 | t.integer "pp", null: false | ||
| 50 | t.datetime "created_at", null: false | ||
| 51 | t.datetime "updated_at", null: false | ||
| 52 | t.string "move_type", null: false | ||
| 53 | t.string "rs_description", null: false | ||
| 54 | t.string "frlg_description", null: false | ||
| 55 | t.string "emerald_description" | ||
| 56 | t.index ["name"], name: "index_moves_on_name", unique: true | ||
| 57 | end | ||
| 58 | |||
| 59 | create_table "pokedex_entries", force: :cascade do |t| | ||
| 60 | t.integer "trainer_id" | ||
| 61 | t.integer "species_id" | ||
| 62 | t.boolean "caught", default: false | ||
| 63 | t.datetime "created_at", null: false | ||
| 64 | t.datetime "updated_at", null: false | ||
| 65 | t.index ["species_id"], name: "index_pokedex_entries_on_species_id" | ||
| 66 | t.index ["trainer_id", "species_id"], name: "index_pokedex_entries_on_trainer_id_and_species_id", unique: true | ||
| 67 | t.index ["trainer_id"], name: "index_pokedex_entries_on_trainer_id" | ||
| 68 | end | ||
| 69 | |||
| 70 | create_table "pokemon", force: :cascade do |t| | ||
| 71 | t.string "uuid", limit: 191, null: false | ||
| 72 | t.integer "trainer_id" | ||
| 73 | t.string "key", limit: 191 | ||
| 74 | t.string "ot_name", null: false | ||
| 75 | t.integer "ot_number", null: false | ||
| 76 | t.string "met_type", null: false | ||
| 77 | t.integer "met_level" | ||
| 78 | t.boolean "shiny", default: false, null: false | ||
| 79 | t.string "nature", null: false | ||
| 80 | t.string "gender", null: false | ||
| 81 | t.boolean "second_ability", null: false | ||
| 82 | t.string "unown_letter", limit: 1 | ||
| 83 | t.datetime "created_at", null: false | ||
| 84 | t.datetime "updated_at", null: false | ||
| 85 | t.string "ot_gender", default: "", null: false | ||
| 86 | t.integer "box" | ||
| 87 | t.integer "slot" | ||
| 88 | t.integer "location_id" | ||
| 89 | t.string "pokeball", null: false | ||
| 90 | t.integer "current_id" | ||
| 91 | t.index ["current_id"], name: "index_pokemon_on_current_id" | ||
| 92 | t.index ["key"], name: "index_pokemon_on_key", unique: true | ||
| 93 | t.index ["trainer_id"], name: "index_pokemon_on_trainer_id" | ||
| 94 | t.index ["uuid"], name: "index_pokemon_on_uuid", unique: true | ||
| 95 | end | ||
| 96 | |||
| 97 | create_table "revisions", force: :cascade do |t| | ||
| 98 | t.integer "pokemon_id", null: false | ||
| 99 | t.integer "sequential_id", null: false | ||
| 100 | t.string "nickname", null: false | ||
| 101 | t.integer "experience", null: false | ||
| 102 | t.integer "level", null: false | ||
| 103 | t.integer "hp", null: false | ||
| 104 | t.integer "attack", null: false | ||
| 105 | t.integer "defense", null: false | ||
| 106 | t.integer "special_attack", null: false | ||
| 107 | t.integer "special_defense", null: false | ||
| 108 | t.integer "speed", null: false | ||
| 109 | t.integer "coolness", null: false | ||
| 110 | t.integer "beauty", null: false | ||
| 111 | t.integer "cuteness", null: false | ||
| 112 | t.integer "smartness", null: false | ||
| 113 | t.integer "toughness", null: false | ||
| 114 | t.integer "sheen", null: false | ||
| 115 | t.integer "item_id" | ||
| 116 | t.integer "move_1_id", null: false | ||
| 117 | t.integer "move_2_id" | ||
| 118 | t.integer "move_3_id" | ||
| 119 | t.integer "move_4_id" | ||
| 120 | t.integer "move_1_pp_bonuses", default: 0, null: false | ||
| 121 | t.integer "move_2_pp_bonuses", default: 0, null: false | ||
| 122 | t.integer "move_3_pp_bonuses", default: 0, null: false | ||
| 123 | t.integer "move_4_pp_bonuses", default: 0, null: false | ||
| 124 | t.datetime "created_at", null: false | ||
| 125 | t.datetime "updated_at", null: false | ||
| 126 | t.integer "cool_ribbons", default: 0, null: false | ||
| 127 | t.integer "beauty_ribbons", default: 0, null: false | ||
| 128 | t.integer "cute_ribbons", default: 0, null: false | ||
| 129 | t.integer "smart_ribbons", default: 0, null: false | ||
| 130 | t.integer "tough_ribbons", default: 0, null: false | ||
| 131 | t.boolean "champion_ribbon", default: false | ||
| 132 | t.boolean "winning_ribbon", default: false | ||
| 133 | t.boolean "victory_ribbon", default: false | ||
| 134 | t.boolean "artist_ribbon", default: false | ||
| 135 | t.boolean "effort_ribbon", default: false | ||
| 136 | t.boolean "marine_ribbon", default: false | ||
| 137 | t.boolean "land_ribbon", default: false | ||
| 138 | t.boolean "sky_ribbon", default: false | ||
| 139 | t.boolean "country_ribbon", default: false | ||
| 140 | t.boolean "national_ribbon", default: false | ||
| 141 | t.boolean "earth_ribbon", default: false | ||
| 142 | t.boolean "world_ribbon", default: false | ||
| 143 | t.integer "species_id", null: false | ||
| 144 | t.index ["move_1_id"], name: "index_revisions_on_move_1_id" | ||
| 145 | t.index ["move_2_id"], name: "index_revisions_on_move_2_id" | ||
| 146 | t.index ["move_3_id"], name: "index_revisions_on_move_3_id" | ||
| 147 | t.index ["move_4_id"], name: "index_revisions_on_move_4_id" | ||
| 148 | t.index ["pokemon_id", "sequential_id"], name: "index_revisions_on_pokemon_id_and_sequential_id", unique: true | ||
| 149 | t.index ["pokemon_id"], name: "index_revisions_on_pokemon_id" | ||
| 150 | t.index ["species_id"], name: "index_revisions_on_species_id" | ||
| 151 | end | ||
| 152 | |||
| 153 | create_table "species", force: :cascade do |t| | ||
| 154 | t.string "name", limit: 191, null: false | ||
| 155 | t.datetime "created_at", null: false | ||
| 156 | t.datetime "updated_at", null: false | ||
| 157 | t.string "type_1", null: false | ||
| 158 | t.string "type_2" | ||
| 159 | t.integer "ability_1_id", null: false | ||
| 160 | t.integer "ability_2_id" | ||
| 161 | t.index ["name"], name: "index_species_on_name", unique: true | ||
| 162 | end | ||
| 163 | |||
| 164 | create_table "trainers", force: :cascade do |t| | ||
| 165 | t.string "game", null: false | ||
| 166 | t.string "name", limit: 191, null: false | ||
| 167 | t.integer "number", null: false | ||
| 168 | t.datetime "created_at", null: false | ||
| 169 | t.datetime "updated_at", null: false | ||
| 170 | t.integer "marine_ribbon_id" | ||
| 171 | t.integer "land_ribbon_id" | ||
| 172 | t.integer "sky_ribbon_id" | ||
| 173 | t.integer "country_ribbon_id" | ||
| 174 | t.integer "national_ribbon_id" | ||
| 175 | t.integer "earth_ribbon_id" | ||
| 176 | t.integer "world_ribbon_id" | ||
| 177 | t.string "box_1_name", null: false | ||
| 178 | t.string "box_2_name", null: false | ||
| 179 | t.string "box_3_name", null: false | ||
| 180 | t.string "box_4_name", null: false | ||
| 181 | t.string "box_5_name", null: false | ||
| 182 | t.string "box_6_name", null: false | ||
| 183 | t.string "box_7_name", null: false | ||
| 184 | t.string "box_8_name", null: false | ||
| 185 | t.string "box_9_name", null: false | ||
| 186 | t.string "box_10_name", null: false | ||
| 187 | t.string "box_11_name", null: false | ||
| 188 | t.string "box_12_name", null: false | ||
| 189 | t.string "box_13_name", null: false | ||
| 190 | t.string "box_14_name", null: false | ||
| 191 | t.index ["country_ribbon_id"], name: "index_trainers_on_country_ribbon_id" | ||
| 192 | t.index ["earth_ribbon_id"], name: "index_trainers_on_earth_ribbon_id" | ||
| 193 | t.index ["land_ribbon_id"], name: "index_trainers_on_land_ribbon_id" | ||
| 194 | t.index ["marine_ribbon_id"], name: "index_trainers_on_marine_ribbon_id" | ||
| 195 | t.index ["name", "number"], name: "index_trainers_on_name_and_number", unique: true | ||
| 196 | t.index ["national_ribbon_id"], name: "index_trainers_on_national_ribbon_id" | ||
| 197 | t.index ["sky_ribbon_id"], name: "index_trainers_on_sky_ribbon_id" | ||
| 198 | t.index ["world_ribbon_id"], name: "index_trainers_on_world_ribbon_id" | ||
| 199 | end | ||
| 200 | |||
| 201 | end | ||
