parent
8a410b569b
commit
4ecd32c6be
@ -0,0 +1,6 @@
|
||||
class WatchCourseVideoDetail < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :watch_course_video
|
||||
|
||||
serialize :times, Array
|
||||
end
|
@ -0,0 +1,14 @@
|
||||
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
|
Loading…
Reference in new issue