about summary refs log tree commit diff stats
path: root/db/migrate/20170916225306_create_pokeviewer_trainers.rb
blob: 18e79520d9895ad507211c710984a57fbc8b0aa6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
class CreatePokeviewerTrainers < ActiveRecord::Migration[5.1]
  def change
    create_table :pokeviewer_trainers do |t|
      t.string :game, null: false
      t.string :name, null: false, limit: 191
      t.integer :number, null: false

      t.timestamps
    end

    add_index :pokeviewer_trainers, [:name, :number], unique: true
  end
end