about summary refs log tree commit diff stats
path: root/db/migrate/20170917002857_create_pokeviewer_revisions.rb
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-23 10:30:23 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-23 10:30:23 -0400
commitf6cdc2fd2f50224fb7dd31d3ccb374cf4ffe7b6d (patch)
tree460dae3bae5a4ac961e6db0d9ca5c2b99bbdca0e /db/migrate/20170917002857_create_pokeviewer_revisions.rb
parent1d621019d7bf74b65898e009aef31766c7e7572b (diff)
downloadpokeviewer-f6cdc2fd2f50224fb7dd31d3ccb374cf4ffe7b6d.tar.gz
pokeviewer-f6cdc2fd2f50224fb7dd31d3ccb374cf4ffe7b6d.tar.bz2
pokeviewer-f6cdc2fd2f50224fb7dd31d3ccb374cf4ffe7b6d.zip
Moved revision moves into revision table
This is a retroactive schema change, so there's no easy way to migrate
into it without losing data, but this is so early into the development
of this project that it really doesn't matter.
Diffstat (limited to 'db/migrate/20170917002857_create_pokeviewer_revisions.rb')
-rw-r--r--db/migrate/20170917002857_create_pokeviewer_revisions.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/db/migrate/20170917002857_create_pokeviewer_revisions.rb b/db/migrate/20170917002857_create_pokeviewer_revisions.rb deleted file mode 100644 index f6755da..0000000 --- a/db/migrate/20170917002857_create_pokeviewer_revisions.rb +++ /dev/null
@@ -1,31 +0,0 @@
1class CreatePokeviewerRevisions < ActiveRecord::Migration[5.1]
2 def change
3 create_table :pokeviewer_revisions do |t|
4 t.references :pokemon, null: false
5 t.integer :sequential_id, null: false
6 t.string :nickname, null: false
7 t.integer :experience, null: false
8 t.integer :level, null: false
9 t.integer :hp, null: false
10 t.integer :attack, null: false
11 t.integer :defense, null: false
12 t.integer :special_attack, null: false
13 t.integer :special_defense, null: false
14 t.integer :speed, null: false
15 t.integer :coolness, null: false
16 t.integer :beauty, null: false
17 t.integer :cuteness, null: false
18 t.integer :smartness, null: false
19 t.integer :toughness, null: false
20 t.integer :sheen, null: false
21 t.integer :hold_item, null: true
22
23 t.timestamps
24 end
25
26 add_index :pokeviewer_revisions, [:pokemon_id, :sequential_id], unique: true
27
28 add_foreign_key :pokeviewer_revisions, :pokewalker_pokemon,
29 column: :pokemon_id
30 end
31end