20180116194825_create_administrations.rb 274 B

12345678910111213
  1. class CreateAdministrations < ActiveRecord::Migration[5.1]
  2. def change
  3. create_table :administrations do |t|
  4. t.references :user
  5. t.references :school
  6. t.timestamps
  7. end
  8. add_index :administrations, [:user_id, :school_id], unique: true
  9. end
  10. end