You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
507 B
19 lines
507 B
class CreateWatchVideoHistories < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :watch_video_histories do |t|
|
|
t.references :watch_course_video, index: true
|
|
t.references :user, index: true
|
|
t.references :video, index: true
|
|
t.boolean :is_finished, default: false
|
|
t.float :duration, default: 0
|
|
t.float :watch_duration, default: 0
|
|
t.datetime :start_at
|
|
t.datetime :end_at
|
|
t.string :device
|
|
t.string :ip
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|