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/20170916234251_create_pokeviewer_pokemon.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'db/migrate/20170916234251_create_pokeviewer_pokemon.rb') diff --git a/db/migrate/20170916234251_create_pokeviewer_pokemon.rb b/db/migrate/20170916234251_create_pokeviewer_pokemon.rb index a8b17af..ec90875 100644 --- a/db/migrate/20170916234251_create_pokeviewer_pokemon.rb +++ b/db/migrate/20170916234251_create_pokeviewer_pokemon.rb @@ -1,6 +1,6 @@ class CreatePokeviewerPokemon < ActiveRecord::Migration[5.1] def change - create_table :pokeviewer_pokemon do |t| + create_table :pokemon do |t| t.string :uuid, null: false, limit: 191 t.references :species, null: false t.references :trainer, null: true @@ -19,13 +19,13 @@ class CreatePokeviewerPokemon < ActiveRecord::Migration[5.1] t.timestamps end - add_index :pokeviewer_pokemon, :uuid, unique: true - add_index :pokeviewer_pokemon, :key, unique: true + add_index :pokemon, :uuid, unique: true + add_index :pokemon, :key, unique: true - add_foreign_key :pokeviewer_pokemon, :pokeviewer_species, + add_foreign_key :pokemon, :species, column: :species_id - add_foreign_key :pokeviewer_pokemon, :pokeviewer_trainers, + add_foreign_key :pokemon, :trainers, column: :trainer_id end end -- cgit 1.4.1