class CreateWatchCourseVideoDetails < ActiveRecord::Migration[5.2]
  def change
    create_table :watch_course_video_details do |t|
      t.references :user, index: true
      t.text :times
      t.references :watch_course_video, index: true

      t.timestamps
    end

    add_column :watch_course_videos, :last_point, :integer, default: 0
    add_column :watch_video_histories, :last_point, :integer, default: 0
  end
end
