tinyforms/db/migrate/20200412214304_add_token_to_attachments.rb
Michael Bumann 73c184a4a0 Use secure token to create attachment links
The link is public but protected by a secure token.

This extends the activesupport Attachment model to automatically
generate a token
2020-04-12 23:47:56 +02:00

7 lines
206 B
Ruby

class AddTokenToAttachments < ActiveRecord::Migration[6.0]
def change
add_column :active_storage_attachments, :token, :string
add_index :active_storage_attachments, :token, unique: true
end
end