From 56f5841d4b9c12296cdfcaeff174b2627d59afc8 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 7 Dec 2024 11:49:49 -0500 Subject: Migrate to full rails app --- db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'db/migrate/20180129213822_create_pokeviewer_pokedex_entries.rb') 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 @@ class CreatePokeviewerPokedexEntries < ActiveRecord::Migration[5.1] def change - create_table :pokeviewer_pokedex_entries do |t| + create_table :pokedex_entries do |t| t.references :trainer, null: true t.references :species, null: true t.boolean :caught, null: true, default: false @@ -8,13 +8,13 @@ class CreatePokeviewerPokedexEntries < ActiveRecord::Migration[5.1] t.timestamps end - add_foreign_key :pokeviewer_pokedex_entries, :pokeviewer_trainers, + add_foreign_key :pokedex_entries, :trainers, column: :trainer_id - add_foreign_key :pokeviewer_pokedex_entries, :pokeviewer_species, + add_foreign_key :pokedex_entries, :species, column: :species_id - add_index :pokeviewer_pokedex_entries, [:trainer_id, :species_id], + add_index :pokedex_entries, [:trainer_id, :species_id], unique: true end end -- cgit 1.4.1