about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 19:01:56 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-30 19:01:56 -0400
commit9c022576fa053fd32aaebc7acb2bb44884a623d7 (patch)
tree6aa6d47da389082eab25fa5a49fae1d07ff56c02 /test
parenta7060addea52af313ed85336dc37949ad8e69f05 (diff)
downloadpokeviewer-9c022576fa053fd32aaebc7acb2bb44884a623d7.tar.gz
pokeviewer-9c022576fa053fd32aaebc7acb2bb44884a623d7.tar.bz2
pokeviewer-9c022576fa053fd32aaebc7acb2bb44884a623d7.zip
Added hold items
An items model was created, but the seed only contains items that can be
held, which excludes key items and HMs. Berry Juice, while unobtainable,
is still included. The item model contains three description fields: one
for Ruby/Sapphire, one for FireRed/LeafGreen, and one for Emerald. This
is because the descriptions for items are different between the games.
In a lot of cases, the Emerald description is the same as the
Ruby/Sapphire one, so in those cases, the Emerald description is nil.
The purpose of having the different descriptions is so that when a
Pokémon holds an item, the website can display the description that is
accurate to the game that that Pokémon is currently in.

In order to fully support TMs, the move model was improved to
additionally contain type and also the three description fields which
operate similarly to those of the item model. For TMs, the description
fields on the item are usually nil. However, some TMs in Ruby/Sapphire,
as well as Emerald, have different descriptions than the moves that
they correspond with. In these cases, those descriptions are in the item
model, and override the move descriptions when the move is looked at as
a TM.
Diffstat (limited to 'test')
-rw-r--r--test/dummy/db/schema.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 9530010..84e15a3 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb
@@ -10,7 +10,7 @@
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
13ActiveRecord::Schema.define(version: 20170930021856) do 13ActiveRecord::Schema.define(version: 20170930213633) do
14 14
15 create_table "pokeviewer_boxes", force: :cascade do |t| 15 create_table "pokeviewer_boxes", force: :cascade do |t|
16 t.integer "trainer_id", null: false 16 t.integer "trainer_id", null: false
@@ -28,6 +28,18 @@ ActiveRecord::Schema.define(version: 20170930021856) do
28 t.datetime "updated_at", null: false 28 t.datetime "updated_at", null: false
29 end 29 end
30 30
31 create_table "pokeviewer_items", force: :cascade do |t|
32 t.string "name", null: false
33 t.boolean "tm", default: false, null: false
34 t.integer "move_id"
35 t.string "rs_description"
36 t.string "frlg_description"
37 t.string "emerald_description"
38 t.datetime "created_at", null: false
39 t.datetime "updated_at", null: false
40 t.index ["move_id"], name: "index_pokeviewer_items_on_move_id"
41 end
42
31 create_table "pokeviewer_locations", force: :cascade do |t| 43 create_table "pokeviewer_locations", force: :cascade do |t|
32 t.string "name", null: false 44 t.string "name", null: false
33 t.datetime "created_at", null: false 45 t.datetime "created_at", null: false
@@ -39,6 +51,10 @@ ActiveRecord::Schema.define(version: 20170930021856) do
39 t.integer "pp", null: false 51 t.integer "pp", null: false
40 t.datetime "created_at", null: false 52 t.datetime "created_at", null: false
41 t.datetime "updated_at", null: false 53 t.datetime "updated_at", null: false
54 t.string "move_type", null: false
55 t.string "rs_description", null: false
56 t.string "frlg_description", null: false
57 t.string "emerald_description"
42 t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true 58 t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true
43 end 59 end
44 60
@@ -86,7 +102,7 @@ ActiveRecord::Schema.define(version: 20170930021856) do
86 t.integer "smartness", null: false 102 t.integer "smartness", null: false
87 t.integer "toughness", null: false 103 t.integer "toughness", null: false
88 t.integer "sheen", null: false 104 t.integer "sheen", null: false
89 t.integer "hold_item" 105 t.integer "item_id"
90 t.integer "move_1_id", null: false 106 t.integer "move_1_id", null: false
91 t.integer "move_2_id" 107 t.integer "move_2_id"
92 t.integer "move_3_id" 108 t.integer "move_3_id"