about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-01-29 21:20:46 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-01-29 21:20:46 -0500
commit100270703f06e7fa1f12ee8bb6aee297c56ce49b (patch)
tree03ea2e2658cd9e623485a7d86e0c1c224adc80c6
parent62ffd6ca978159889a87dfe4321c1c790f9108b6 (diff)
downloadthoughts-100270703f06e7fa1f12ee8bb6aee297c56ce49b.tar.gz
thoughts-100270703f06e7fa1f12ee8bb6aee297c56ce49b.tar.bz2
thoughts-100270703f06e7fa1f12ee8bb6aee297c56ce49b.zip
Updated pokeviewer (Pokédex)
-rw-r--r--Gemfile.lock18
-rw-r--r--db/migrate/20180130021851_create_pokeviewer_pokedex_entries.pokeviewer.rb21
-rw-r--r--db/schema.rb15
3 files changed, 44 insertions, 10 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index db45fb3..c3b8b10 100644 --- a/Gemfile.lock +++ b/Gemfile.lock
@@ -1,6 +1,6 @@
1GIT 1GIT
2 remote: https://github.com/hatkirby/pokeviewer.git 2 remote: https://github.com/hatkirby/pokeviewer.git
3 revision: 30cd66e1521bc760df45908adb2f7d3ba6683900 3 revision: 8d548aef82436ab20b1fe6dd6f6e39d1cbca6119
4 specs: 4 specs:
5 pokeviewer (0.1.0) 5 pokeviewer (0.1.0)
6 activerecord-diff 6 activerecord-diff
@@ -63,7 +63,7 @@ GEM
63 bcrypt (3.1.11) 63 bcrypt (3.1.11)
64 bindex (0.5.0) 64 bindex (0.5.0)
65 builder (3.2.3) 65 builder (3.2.3)
66 byebug (9.1.0) 66 byebug (10.0.0)
67 capistrano (3.10.1) 67 capistrano (3.10.1)
68 airbrussh (>= 1.0.0) 68 airbrussh (>= 1.0.0)
69 i18n 69 i18n
@@ -104,7 +104,7 @@ GEM
104 coffee-script-source (1.12.2) 104 coffee-script-source (1.12.2)
105 concurrent-ruby (1.0.5) 105 concurrent-ruby (1.0.5)
106 crass (1.0.3) 106 crass (1.0.3)
107 devise (4.4.0) 107 devise (4.4.1)
108 bcrypt (~> 3.0) 108 bcrypt (~> 3.0)
109 orm_adapter (~> 0.1) 109 orm_adapter (~> 0.1)
110 railties (>= 4.1.0, < 5.2) 110 railties (>= 4.1.0, < 5.2)
@@ -121,7 +121,7 @@ GEM
121 temple (>= 0.8.0) 121 temple (>= 0.8.0)
122 tilt 122 tilt
123 highline (1.7.10) 123 highline (1.7.10)
124 i18n (0.9.1) 124 i18n (0.9.3)
125 concurrent-ruby (~> 1.0) 125 concurrent-ruby (~> 1.0)
126 jbuilder (2.7.0) 126 jbuilder (2.7.0)
127 activesupport (>= 4.2.0) 127 activesupport (>= 4.2.0)
@@ -147,25 +147,25 @@ GEM
147 mimemagic (0.3.2) 147 mimemagic (0.3.2)
148 mini_mime (1.0.0) 148 mini_mime (1.0.0)
149 mini_portile2 (2.3.0) 149 mini_portile2 (2.3.0)
150 minitest (5.11.1) 150 minitest (5.11.3)
151 multi_json (1.13.1) 151 multi_json (1.13.1)
152 mysql2 (0.4.10) 152 mysql2 (0.4.10)
153 net-scp (1.2.1) 153 net-scp (1.2.1)
154 net-ssh (>= 2.6.5) 154 net-ssh (>= 2.6.5)
155 net-ssh (4.2.0) 155 net-ssh (4.2.0)
156 nio4r (2.2.0) 156 nio4r (2.2.0)
157 nokogiri (1.8.1) 157 nokogiri (1.8.2)
158 mini_portile2 (~> 2.3.0) 158 mini_portile2 (~> 2.3.0)
159 normalize-rails (4.1.1) 159 normalize-rails (4.1.1)
160 orm_adapter (0.5.0) 160 orm_adapter (0.5.0)
161 paperclip (5.1.0) 161 paperclip (5.2.1)
162 activemodel (>= 4.2.0) 162 activemodel (>= 4.2.0)
163 activesupport (>= 4.2.0) 163 activesupport (>= 4.2.0)
164 cocaine (~> 0.5.5) 164 cocaine (~> 0.5.5)
165 mime-types 165 mime-types
166 mimemagic (~> 0.3.0) 166 mimemagic (~> 0.3.0)
167 public_suffix (3.0.1) 167 public_suffix (3.0.1)
168 puma (3.11.0) 168 puma (3.11.2)
169 rack (2.0.3) 169 rack (2.0.3)
170 rack-test (0.8.2) 170 rack-test (0.8.2)
171 rack (>= 1.0, < 3) 171 rack (>= 1.0, < 3)
@@ -247,7 +247,7 @@ GEM
247 turbolinks-source (5.1.0) 247 turbolinks-source (5.1.0)
248 tzinfo (1.2.4) 248 tzinfo (1.2.4)
249 thread_safe (~> 0.1) 249 thread_safe (~> 0.1)
250 uglifier (4.1.3) 250 uglifier (4.1.5)
251 execjs (>= 0.3.0, < 3) 251 execjs (>= 0.3.0, < 3)
252 victor (0.2.1) 252 victor (0.2.1)
253 warden (1.2.7) 253 warden (1.2.7)
diff --git a/db/migrate/20180130021851_create_pokeviewer_pokedex_entries.pokeviewer.rb b/db/migrate/20180130021851_create_pokeviewer_pokedex_entries.pokeviewer.rb new file mode 100644 index 0000000..2451ef2 --- /dev/null +++ b/db/migrate/20180130021851_create_pokeviewer_pokedex_entries.pokeviewer.rb
@@ -0,0 +1,21 @@
1# This migration comes from pokeviewer (originally 20180129213822)
2class CreatePokeviewerPokedexEntries < ActiveRecord::Migration[5.1]
3 def change
4 create_table :pokeviewer_pokedex_entries do |t|
5 t.references :trainer, null: true
6 t.references :species, null: true
7 t.boolean :caught, null: true, default: false
8
9 t.timestamps
10 end
11
12 add_foreign_key :pokeviewer_pokedex_entries, :pokeviewer_trainers,
13 column: :trainer_id
14
15 add_foreign_key :pokeviewer_pokedex_entries, :pokeviewer_species,
16 column: :species_id
17
18 add_index :pokeviewer_pokedex_entries, [:trainer_id, :species_id],
19 unique: true
20 end
21end
diff --git a/db/schema.rb b/db/schema.rb index f4243a4..868f6f6 100644 --- a/db/schema.rb +++ b/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: 20180114181813) do 13ActiveRecord::Schema.define(version: 20180130021851) do
14 14
15 create_table "ckeditor_assets", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t| 15 create_table "ckeditor_assets", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t|
16 t.string "data_file_name", null: false 16 t.string "data_file_name", null: false
@@ -78,6 +78,17 @@ ActiveRecord::Schema.define(version: 20180114181813) do
78 t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true 78 t.index ["name"], name: "index_pokeviewer_moves_on_name", unique: true
79 end 79 end
80 80
81 create_table "pokeviewer_pokedex_entries", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t|
82 t.bigint "trainer_id"
83 t.bigint "species_id"
84 t.boolean "caught", default: false
85 t.datetime "created_at", null: false
86 t.datetime "updated_at", null: false
87 t.index ["species_id"], name: "index_pokeviewer_pokedex_entries_on_species_id"
88 t.index ["trainer_id", "species_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id_and_species_id", unique: true
89 t.index ["trainer_id"], name: "index_pokeviewer_pokedex_entries_on_trainer_id"
90 end
91
81 create_table "pokeviewer_pokemon", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t| 92 create_table "pokeviewer_pokemon", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" do |t|
82 t.string "uuid", null: false 93 t.string "uuid", null: false
83 t.integer "trainer_id" 94 t.integer "trainer_id"
@@ -239,6 +250,8 @@ ActiveRecord::Schema.define(version: 20180114181813) do
239 t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true 250 t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
240 end 251 end
241 252
253 add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_species", column: "species_id"
254 add_foreign_key "pokeviewer_pokedex_entries", "pokeviewer_trainers", column: "trainer_id"
242 add_foreign_key "pokeviewer_pokemon", "pokeviewer_revisions", column: "current_id" 255 add_foreign_key "pokeviewer_pokemon", "pokeviewer_revisions", column: "current_id"
243 add_foreign_key "pokeviewer_revisions", "pokeviewer_species", column: "species_id" 256 add_foreign_key "pokeviewer_revisions", "pokeviewer_species", column: "species_id"
244end 257end