media assets: add duration column.
Add a column for tracking the duration (length) of videos and animations. The duration will be null for static images.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class AddDurationToMediaAssets < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :media_assets, :duration, :float, null: true, default: nil, if_not_exists: true
|
||||
add_index :media_assets, :duration, where: "duration IS NOT NULL"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user