# frozen_string_literal: true
class CreatePostHotlinkedMedia < ActiveRecord::Migration[6.1]
def change
reversible do |dir|
dir.up do
execute <<~SQL
CREATE TYPE hotlinked_media_status AS ENUM('downloaded', 'too_large', 'download_failed', 'upload_create_failed')
SQL
end
dir.down do
execute <<~SQL
DROP TYPE hotlinked_media_status
SQL
end
end
create_table :post_hotlinked_media do |t|
t.bigint :post_id, null: false
t.string :url, null: false
This file has been truncated. show original