about summary refs log tree commit diff stats
path: root/db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-12-07 11:49:49 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-12-07 11:49:49 -0500
commit56f5841d4b9c12296cdfcaeff174b2627d59afc8 (patch)
tree4f7da4ebbe5ee15a1594b26466ed78e2cf10de35 /db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb
parentc1b0443ba2aebdbd39291ddab0c189f3f4831320 (diff)
downloadpokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.gz
pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.bz2
pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.zip
Migrate to full rails app
Diffstat (limited to 'db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb')
-rw-r--r--db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb b/db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb index 8456456..a6f1bec 100644 --- a/db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb +++ b/db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb
@@ -1,6 +1,6 @@
1class CreatePokeviewerPokedexEntries < ActiveRecord::Migration[5.1] 1class CreatePokeviewerPokedexEntries < ActiveRecord::Migration[5.1]
2 def change 2 def change
3 create_table :pokeviewer_pokedex_entries do |t| 3 create_table :pokedex_entries do |t|
4 t.references :trainer, null: true 4 t.references :trainer, null: true
5 t.references :species, null: true 5 t.references :species, null: true
6 t.boolean :caught, null: true, default: false 6 t.boolean :caught, null: true, default: false
@@ -8,13 +8,13 @@ class CreatePokeviewerPokedexEntries < ActiveRecord::Migration[5.1]
8 t.timestamps 8 t.timestamps
9 end 9 end
10 10
11 add_foreign_key :pokeviewer_pokedex_entries, :pokeviewer_trainers, 11 add_foreign_key :pokedex_entries, :trainers,
12 column: :trainer_id 12 column: :trainer_id
13 13
14 add_foreign_key :pokeviewer_pokedex_entries, :pokeviewer_species, 14 add_foreign_key :pokedex_entries, :species,
15 column: :species_id 15 column: :species_id
16 16
17 add_index :pokeviewer_pokedex_entries, [:trainer_id, :species_id], 17 add_index :pokedex_entries, [:trainer_id, :species_id],
18 unique: true 18 unique: true
19 end 19 end
20end 20end