diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-23 10:30:23 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-23 10:30:23 -0400 |
commit | f6cdc2fd2f50224fb7dd31d3ccb374cf4ffe7b6d (patch) | |
tree | 460dae3bae5a4ac961e6db0d9ca5c2b99bbdca0e /db/migrate/20170917011258_create_pokeviewer_revision_moves.rb | |
parent | 1d621019d7bf74b65898e009aef31766c7e7572b (diff) | |
download | pokeviewer-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/20170917011258_create_pokeviewer_revision_moves.rb')
-rw-r--r-- | db/migrate/20170917011258_create_pokeviewer_revision_moves.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/db/migrate/20170917011258_create_pokeviewer_revision_moves.rb b/db/migrate/20170917011258_create_pokeviewer_revision_moves.rb deleted file mode 100644 index e061207..0000000 --- a/db/migrate/20170917011258_create_pokeviewer_revision_moves.rb +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | class CreatePokeviewerRevisionMoves < ActiveRecord::Migration[5.1] | ||
2 | def change | ||
3 | create_table :pokeviewer_revision_moves do |t| | ||
4 | t.references :revision, null: false | ||
5 | t.references :move, null: false | ||
6 | t.integer :number, null: false | ||
7 | t.integer :pp_bonuses, null: false, default: 0 | ||
8 | |||
9 | t.timestamps | ||
10 | end | ||
11 | |||
12 | add_index :pokeviewer_revision_moves, [:revision_id, :number], unique: true | ||
13 | |||
14 | add_foreign_key :pokeviewer_revision_moves, :pokeviewer_revisions, | ||
15 | column: :revision_id | ||
16 | |||
17 | add_foreign_key :pokeviewer_revision_moves, :pokeviewer_moves, | ||
18 | column: :move_id | ||
19 | end | ||
20 | end | ||