16 lines
414 B
Ruby
16 lines
414 B
Ruby
class CreatePlaybackSessions < ActiveRecord::Migration[8.1]
|
|
def change
|
|
create_table :playback_sessions do |t|
|
|
t.references :video, null: false, foreign_key: true
|
|
t.references :user, null: false, foreign_key: true
|
|
t.float :position
|
|
t.float :duration_watched
|
|
t.datetime :last_watched_at
|
|
t.boolean :completed
|
|
t.integer :play_count
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|