diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-07 11:49:49 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-07 11:49:49 -0500 |
commit | 56f5841d4b9c12296cdfcaeff174b2627d59afc8 (patch) | |
tree | 4f7da4ebbe5ee15a1594b26466ed78e2cf10de35 /db/migrate/20170916234251_create_pokeviewer_pokemon.rb | |
parent | c1b0443ba2aebdbd39291ddab0c189f3f4831320 (diff) | |
download | pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.gz pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.bz2 pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.zip |
Migrate to full rails app
Diffstat (limited to 'db/migrate/20170916234251_create_pokeviewer_pokemon.rb')
-rw-r--r-- | db/migrate/20170916234251_create_pokeviewer_pokemon.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/db/migrate/20170916234251_create_pokeviewer_pokemon.rb b/db/migrate/20170916234251_create_pokeviewer_pokemon.rb index a8b17af..ec90875 100644 --- a/db/migrate/20170916234251_create_pokeviewer_pokemon.rb +++ b/db/migrate/20170916234251_create_pokeviewer_pokemon.rb | |||
@@ -1,6 +1,6 @@ | |||
1 | class CreatePokeviewerPokemon < ActiveRecord::Migration[5.1] | 1 | class CreatePokeviewerPokemon < ActiveRecord::Migration[5.1] |
2 | def change | 2 | def change |
3 | create_table :pokeviewer_pokemon do |t| | 3 | create_table :pokemon do |t| |
4 | t.string :uuid, null: false, limit: 191 | 4 | t.string :uuid, null: false, limit: 191 |
5 | t.references :species, null: false | 5 | t.references :species, null: false |
6 | t.references :trainer, null: true | 6 | t.references :trainer, null: true |
@@ -19,13 +19,13 @@ class CreatePokeviewerPokemon < ActiveRecord::Migration[5.1] | |||
19 | t.timestamps | 19 | t.timestamps |
20 | end | 20 | end |
21 | 21 | ||
22 | add_index :pokeviewer_pokemon, :uuid, unique: true | 22 | add_index :pokemon, :uuid, unique: true |
23 | add_index :pokeviewer_pokemon, :key, unique: true | 23 | add_index :pokemon, :key, unique: true |
24 | 24 | ||
25 | add_foreign_key :pokeviewer_pokemon, :pokeviewer_species, | 25 | add_foreign_key :pokemon, :species, |
26 | column: :species_id | 26 | column: :species_id |
27 | 27 | ||
28 | add_foreign_key :pokeviewer_pokemon, :pokeviewer_trainers, | 28 | add_foreign_key :pokemon, :trainers, |
29 | column: :trainer_id | 29 | column: :trainer_id |
30 | end | 30 | end |
31 | end | 31 | end |