From a7060addea52af313ed85336dc37949ad8e69f05 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 30 Sep 2017 08:23:48 -0400 Subject: Added gift ribbon descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is basically just for completeness because it is unknown whether gift ribbons other than the National Ribbon and Earth Ribbon from Pokémon Colosseum were ever distributed. --- ...0170929221317_create_pokeviewer_gift_ribbons.rb | 9 ++++++ .../20170930021856_add_gift_ribbons_to_trainer.rb | 34 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 db/migrate/20170929221317_create_pokeviewer_gift_ribbons.rb create mode 100644 db/migrate/20170930021856_add_gift_ribbons_to_trainer.rb (limited to 'db/migrate') diff --git a/db/migrate/20170929221317_create_pokeviewer_gift_ribbons.rb b/db/migrate/20170929221317_create_pokeviewer_gift_ribbons.rb new file mode 100644 index 0000000..deedc80 --- /dev/null +++ b/db/migrate/20170929221317_create_pokeviewer_gift_ribbons.rb @@ -0,0 +1,9 @@ +class CreatePokeviewerGiftRibbons < ActiveRecord::Migration[5.1] + def change + create_table :pokeviewer_gift_ribbons do |t| + t.string :description, null: false + + t.timestamps + end + end +end diff --git a/db/migrate/20170930021856_add_gift_ribbons_to_trainer.rb b/db/migrate/20170930021856_add_gift_ribbons_to_trainer.rb new file mode 100644 index 0000000..2a5f9b3 --- /dev/null +++ b/db/migrate/20170930021856_add_gift_ribbons_to_trainer.rb @@ -0,0 +1,34 @@ +class AddGiftRibbonsToTrainer < ActiveRecord::Migration[5.1] + def change + change_table :pokeviewer_trainers do |t| + t.references :marine_ribbon, null: true + t.references :land_ribbon, null: true + t.references :sky_ribbon, null: true + t.references :country_ribbon, null: true + t.references :national_ribbon, null: true + t.references :earth_ribbon, null: true + t.references :world_ribbon, null: true + end + + add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, + column: :marine_ribbon_id + + add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, + column: :land_ribbon_id + + add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, + column: :sky_ribbon_id + + add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, + column: :country_ribbon_id + + add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, + column: :national_ribbon_id + + add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, + column: :earth_ribbon_id + + add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, + column: :world_ribbon_id + end +end -- cgit 1.4.1