From 9d6d876c62408c69c654aab1a664f1294ec668b7 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Oct 2017 13:49:03 -0400 Subject: Added pokeviewer --- .../20171015171547_create_pokeviewer_boxes.pokeviewer.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/migrate/20171015171547_create_pokeviewer_boxes.pokeviewer.rb (limited to 'db/migrate/20171015171547_create_pokeviewer_boxes.pokeviewer.rb') diff --git a/db/migrate/20171015171547_create_pokeviewer_boxes.pokeviewer.rb b/db/migrate/20171015171547_create_pokeviewer_boxes.pokeviewer.rb new file mode 100644 index 0000000..90323d1 --- /dev/null +++ b/db/migrate/20171015171547_create_pokeviewer_boxes.pokeviewer.rb @@ -0,0 +1,16 @@ +# This migration comes from pokeviewer (originally 20170924224550) +class CreatePokeviewerBoxes < ActiveRecord::Migration[5.1] + def change + create_table :pokeviewer_boxes do |t| + t.references :trainer, null: false + t.integer :number, null: false + t.string :name, null: false + + t.timestamps + end + + add_foreign_key :pokeviewer_boxes, :pokeviewer_trainers, column: :trainer_id + + add_index :pokeviewer_boxes, [:trainer_id, :number], unique: true + end +end -- cgit 1.4.1