20180219101748_create_courses.rb 248 B

123456789101112
  1. class CreateCourses < ActiveRecord::Migration[5.1]
  2. def change
  3. create_table :courses do |t|
  4. t.string :name
  5. t.belongs_to :school, foreign_key: true
  6. t.date :starts_on
  7. t.date :ends_on
  8. t.timestamps
  9. end
  10. end
  11. end