about summary refs log tree commit diff stats
path: root/db/migrate/20171015171539_create_pokeviewer_trainers.pokeviewer.rb
blob: 396bcea94fad4105285836f8f00e535f5c4ce099 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# This migration comes from pokeviewer (originally 20170916225306)
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