about summary refs log tree commit diff stats
path: root/db/migrate/20171015171551_add_gift_ribbons_to_trainer.pokeviewer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20171015171551_add_gift_ribbons_to_trainer.pokeviewer.rb')
-rw-r--r--db/migrate/20171015171551_add_gift_ribbons_to_trainer.pokeviewer.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/db/migrate/20171015171551_add_gift_ribbons_to_trainer.pokeviewer.rb b/db/migrate/20171015171551_add_gift_ribbons_to_trainer.pokeviewer.rb new file mode 100644 index 0000000..5bef8d5 --- /dev/null +++ b/db/migrate/20171015171551_add_gift_ribbons_to_trainer.pokeviewer.rb
@@ -0,0 +1,35 @@
1# This migration comes from pokeviewer (originally 20170930021856)
2class AddGiftRibbonsToTrainer < ActiveRecord::Migration[5.1]
3 def change
4 change_table :pokeviewer_trainers do |t|
5 t.references :marine_ribbon, null: true
6 t.references :land_ribbon, null: true
7 t.references :sky_ribbon, null: true
8 t.references :country_ribbon, null: true
9 t.references :national_ribbon, null: true
10 t.references :earth_ribbon, null: true
11 t.references :world_ribbon, null: true
12 end
13
14 add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons,
15 column: :marine_ribbon_id
16
17 add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons,
18 column: :land_ribbon_id
19
20 add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons,
21 column: :sky_ribbon_id
22
23 add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons,
24 column: :country_ribbon_id
25
26 add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons,
27 column: :national_ribbon_id
28
29 add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons,
30 column: :earth_ribbon_id
31
32 add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons,
33 column: :world_ribbon_id
34 end
35end