diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170929221317_create_pokeviewer_gift_ribbons.rb | 9 | ||||
-rw-r--r-- | db/migrate/20170930021856_add_gift_ribbons_to_trainer.rb | 34 | ||||
-rw-r--r-- | db/seeds.rb | 65 |
3 files changed, 108 insertions, 0 deletions
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 @@ | |||
1 | class CreatePokeviewerGiftRibbons < ActiveRecord::Migration[5.1] | ||
2 | def change | ||
3 | create_table :pokeviewer_gift_ribbons do |t| | ||
4 | t.string :description, null: false | ||
5 | |||
6 | t.timestamps | ||
7 | end | ||
8 | end | ||
9 | 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 @@ | |||
1 | class AddGiftRibbonsToTrainer < ActiveRecord::Migration[5.1] | ||
2 | def change | ||
3 | change_table :pokeviewer_trainers do |t| | ||
4 | t.references :marine_ribbon, null: true | ||
5 | t.references :land_ribbon, null: true | ||
6 | t.references :sky_ribbon, null: true | ||
7 | t.references :country_ribbon, null: true | ||
8 | t.references :national_ribbon, null: true | ||
9 | t.references :earth_ribbon, null: true | ||
10 | t.references :world_ribbon, null: true | ||
11 | end | ||
12 | |||
13 | add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, | ||
14 | column: :marine_ribbon_id | ||
15 | |||
16 | add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, | ||
17 | column: :land_ribbon_id | ||
18 | |||
19 | add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, | ||
20 | column: :sky_ribbon_id | ||
21 | |||
22 | add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, | ||
23 | column: :country_ribbon_id | ||
24 | |||
25 | add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, | ||
26 | column: :national_ribbon_id | ||
27 | |||
28 | add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, | ||
29 | column: :earth_ribbon_id | ||
30 | |||
31 | add_foreign_key :pokeviewer_trainers, :pokeviewer_gift_ribbons, | ||
32 | column: :world_ribbon_id | ||
33 | end | ||
34 | end | ||
diff --git a/db/seeds.rb b/db/seeds.rb index 221538e..500e3c6 100644 --- a/db/seeds.rb +++ b/db/seeds.rb | |||
@@ -954,4 +954,69 @@ module Pokeviewer | |||
954 | Location.create(id: 210, name: "Altering Cave") | 954 | Location.create(id: 210, name: "Altering Cave") |
955 | Location.create(id: 211, name: "Navel Rock") | 955 | Location.create(id: 211, name: "Navel Rock") |
956 | Location.create(id: 212, name: "Trainer Hill") | 956 | Location.create(id: 212, name: "Trainer Hill") |
957 | |||
958 | GiftRibbon.create(id: 1, description: "2003 REGIONAL TOURNEY CHAMPION RIBBON") | ||
959 | GiftRibbon.create(id: 2, description: "2003 NATIONAL TOURNEY CHAMPION RIBBON") | ||
960 | GiftRibbon.create(id: 3, description: "2003 GLOBAL CUP CHAMPION RIBBON") | ||
961 | GiftRibbon.create(id: 4, description: "2003 REGIONAL TOURNEY Runner-up RIBBON") | ||
962 | GiftRibbon.create(id: 5, description: "2003 NATIONAL TOURNEY Runner-up RIBBON") | ||
963 | GiftRibbon.create(id: 6, description: "2003 GLOBAL CUP Runner-up RIBBON") | ||
964 | GiftRibbon.create(id: 7, description: "2003 REGIONAL TOURNEY Semifinalist RIBBON") | ||
965 | GiftRibbon.create(id: 8, description: "2003 NATIONAL TOURNEY Semifinalist RIBBON") | ||
966 | GiftRibbon.create(id: 9, description: "2003 GLOBAL CUP Semifinalist RIBBON") | ||
967 | GiftRibbon.create(id: 10, description: "2004 REGIONAL TOURNEY CHAMPION RIBBON") | ||
968 | GiftRibbon.create(id: 11, description: "2004 NATIONAL TOURNEY CHAMPION RIBBON") | ||
969 | GiftRibbon.create(id: 12, description: "2004 GLOBAL CUP CHAMPION RIBBON") | ||
970 | GiftRibbon.create(id: 13, description: "2004 REGIONAL TOURNEY Runner-up RIBBON") | ||
971 | GiftRibbon.create(id: 14, description: "2004 NATIONAL TOURNEY Runner-up RIBBON") | ||
972 | GiftRibbon.create(id: 15, description: "2004 GLOBAL CUP Runner-up RIBBON") | ||
973 | GiftRibbon.create(id: 16, description: "2004 REGIONAL TOURNEY Semifinalist RIBBON") | ||
974 | GiftRibbon.create(id: 17, description: "2004 NATIONAL TOURNEY Semifinalist RIBBON") | ||
975 | GiftRibbon.create(id: 18, description: "2004 GLOBAL CUP Semifinalist RIBBON") | ||
976 | GiftRibbon.create(id: 19, description: "2005 REGIONAL TOURNEY CHAMPION RIBBON") | ||
977 | GiftRibbon.create(id: 20, description: "2005 NATIONAL TOURNEY CHAMPION RIBBON") | ||
978 | GiftRibbon.create(id: 21, description: "2005 GLOBAL CUP CHAMPION RIBBON") | ||
979 | GiftRibbon.create(id: 22, description: "2005 REGIONAL TOURNEY Runner-up RIBBON") | ||
980 | GiftRibbon.create(id: 23, description: "2005 NATIONAL TOURNEY Runner-up RIBBON") | ||
981 | GiftRibbon.create(id: 24, description: "2005 GLOBAL CUP Runner-up RIBBON") | ||
982 | GiftRibbon.create(id: 25, description: "2005 REGIONAL TOURNEY Semifinalist RIBBON") | ||
983 | GiftRibbon.create(id: 26, description: "2005 NATIONAL TOURNEY Semifinalist RIBBON") | ||
984 | GiftRibbon.create(id: 27, description: "2005 GLOBAL CUP Semifinalist RIBBON") | ||
985 | GiftRibbon.create(id: 28, description: "POKéMON BATTLE CUP CHAMPION RIBBON") | ||
986 | GiftRibbon.create(id: 29, description: "POKéMON BATTLE CUP Runner-up RIBBON") | ||
987 | GiftRibbon.create(id: 30, description: "POKéMON BATTLE CUP Semifinalist RIBBON") | ||
988 | GiftRibbon.create(id: 31, description: "POKéMON BATTLE CUP Participation RIBBON") | ||
989 | GiftRibbon.create(id: 32, description: "POKéMON LEAGUE CHAMPION RIBBON") | ||
990 | GiftRibbon.create(id: 33, description: "POKéMON LEAGUE Runner-up RIBBON") | ||
991 | GiftRibbon.create(id: 34, description: "POKéMON LEAGUE Semifinalist RIBBON") | ||
992 | GiftRibbon.create(id: 35, description: "POKéMON LEAGUE Participation RIBBON") | ||
993 | GiftRibbon.create(id: 36, description: "ADVANCE CUP CHAMPION RIBBON") | ||
994 | GiftRibbon.create(id: 37, description: "ADVANCE CUP Runner-up RIBBON") | ||
995 | GiftRibbon.create(id: 38, description: "ADVANCE CUP Semifinalist RIBBON") | ||
996 | GiftRibbon.create(id: 39, description: "ADVANCE CUP Participation RIBBON") | ||
997 | GiftRibbon.create(id: 40, description: "POKéMON Tournament Participation RIBBON") | ||
998 | GiftRibbon.create(id: 41, description: "POKéMON Event Participation RIBBON") | ||
999 | GiftRibbon.create(id: 42, description: "POKéMON Festival Participation RIBBON") | ||
1000 | GiftRibbon.create(id: 43, description: "Difficulty-clearing Commemorative RIBBON") | ||
1001 | GiftRibbon.create(id: 44, description: "RIBBON awarded for clearing all difficulties.") | ||
1002 | GiftRibbon.create(id: 45, description: "100-straight Win Commemorative RIBBON") | ||
1003 | GiftRibbon.create(id: 46, description: "DARKNESS TOWER Clear Commemorative RIBBON") | ||
1004 | GiftRibbon.create(id: 47, description: "RED TOWER Clear Commemorative RIBBON") | ||
1005 | GiftRibbon.create(id: 48, description: "BLACKIRON TOWER Clear Commemorative RIBBON") | ||
1006 | GiftRibbon.create(id: 49, description: "FINAL TOWER Clear Commemorative RIBBON") | ||
1007 | GiftRibbon.create(id: 50, description: "Legend-making Commemorative RIBBON") | ||
1008 | GiftRibbon.create(id: 51, description: "POKéMON CENTER TOKYO Commemorative RIBBON") | ||
1009 | GiftRibbon.create(id: 52, description: "POKéMON CENTER OSAKA Commemorative RIBBON") | ||
1010 | GiftRibbon.create(id: 53, description: "POKéMON CENTER NAGOYA Commemorative RIBBON") | ||
1011 | GiftRibbon.create(id: 54, description: "POKéMON CENTER NY Commemorative RIBBON") | ||
1012 | GiftRibbon.create(id: 55, description: "Summer Holidays RIBBON") | ||
1013 | GiftRibbon.create(id: 56, description: "Winter Holidays RIBBON") | ||
1014 | GiftRibbon.create(id: 57, description: "Spring Holidays RIBBON") | ||
1015 | GiftRibbon.create(id: 58, description: "Evergreen RIBBON") | ||
1016 | GiftRibbon.create(id: 59, description: "Special Holiday RIBBON") | ||
1017 | GiftRibbon.create(id: 60, description: "Hard Worker RIBBON") | ||
1018 | GiftRibbon.create(id: 61, description: "Lots of Friends RIBBON") | ||
1019 | GiftRibbon.create(id: 62, description: "Full of Energy RIBBON") | ||
1020 | GiftRibbon.create(id: 63, description: "A commemorative RIBBON for a loved POKéMON.") | ||
1021 | GiftRibbon.create(id: 64, description: "RIBBON that shows love for POKéMON.") | ||
957 | end | 1022 | end |