You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
590 B

class CreateAttachments < ActiveRecord::Migration[7.1]
def change
create_table :attachments do |t|
t.references 'asset'
t.integer "attachable_for_id"
t.text "attachable_for_type"
t.jsonb "body", default: {}
t.jsonb "url", default: {}
t.jsonb "props", default: {}
t.boolean "is_favorite", default: false, null: false
t.integer "position"
t.timestamps
t.index [ "attachable_for_id", "attachable_for_type" ], name: "attachable_for"
t.index [ "is_favorite" ], name: "index_attachments_on_is_favorite"
end
end
end