32 lines
823 B
Ruby
32 lines
823 B
Ruby
class CreateVideos < ActiveRecord::Migration[8.1]
|
|
def change
|
|
create_table :videos do |t|
|
|
t.references :work, null: false, foreign_key: true
|
|
t.references :storage_location, null: false, foreign_key: true
|
|
t.string :title
|
|
t.string :file_path
|
|
t.string :file_hash
|
|
t.integer :file_size
|
|
t.float :duration
|
|
t.integer :width
|
|
t.integer :height
|
|
t.string :resolution_label
|
|
t.string :video_codec
|
|
t.string :audio_codec
|
|
t.integer :bit_rate
|
|
t.float :frame_rate
|
|
t.string :format
|
|
t.boolean :has_subtitles
|
|
t.string :version_type
|
|
t.integer :source_type
|
|
t.string :source_url
|
|
t.boolean :imported
|
|
t.boolean :processing_failed
|
|
t.text :error_message
|
|
t.text :metadata
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|