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/20170924224550_create_pokeviewer_boxes.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'db/migrate/20170924224550_create_pokeviewer_boxes.rb') diff --git a/db/migrate/20170924224550_create_pokeviewer_boxes.rb b/db/migrate/20170924224550_create_pokeviewer_boxes.rb index 4db2108..7a100c3 100644 --- a/db/migrate/20170924224550_create_pokeviewer_boxes.rb +++ b/db/migrate/20170924224550_create_pokeviewer_boxes.rb @@ -1,6 +1,6 @@ class CreatePokeviewerBoxes < ActiveRecord::Migration[5.1] def change - create_table :pokeviewer_boxes do |t| + create_table :boxes do |t| t.references :trainer, null: false t.integer :number, null: false t.string :name, null: false @@ -8,8 +8,8 @@ class CreatePokeviewerBoxes < ActiveRecord::Migration[5.1] t.timestamps end - add_foreign_key :pokeviewer_boxes, :pokeviewer_trainers, column: :trainer_id + add_foreign_key :boxes, :trainers, column: :trainer_id - add_index :pokeviewer_boxes, [:trainer_id, :number], unique: true + add_index :boxes, [:trainer_id, :number], unique: true end end -- cgit 1.4.1