Add thumbnail attribute on Enconded Content

This is meant to hold the thumbnail generated by Zencoder for a given
encoded content.
Signed-off-by: marcheing's avatarHeitor Reis <marcheing@gmail.com>
parent 16916151
class AddThumbnailToEncodedContent < ActiveRecord::Migration[5.0]
def self.up
change_table :encoded_contents do |t|
t.attachment :thumbnail
end
end
def self.down
remove_attachment :encoded_contents, :thumbnail
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160701135238) do
ActiveRecord::Schema.define(version: 20160706141505) do
create_table "contents", force: :cascade do |t|
t.string "title", null: false
......@@ -50,8 +50,8 @@ ActiveRecord::Schema.define(version: 20160701135238) do
end
create_table "encoded_contents", force: :cascade do |t|
t.integer "content_id", null: false
t.integer "job_id", null: false
t.integer "content_id", null: false
t.integer "job_id", null: false
t.integer "output_id"
t.integer "file_size"
t.integer "width"
......@@ -62,8 +62,12 @@ ActiveRecord::Schema.define(version: 20160701135238) do
t.string "video_content_type"
t.integer "video_file_size"
t.datetime "video_updated_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "thumbnail_file_name"
t.string "thumbnail_content_type"
t.integer "thumbnail_file_size"
t.datetime "thumbnail_updated_at"
end
create_table "profiles", force: :cascade do |t|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment