20170917153509_create_custom_emojis.rb 547 B

1234567891011121314151617181920
  1. # frozen_string_literal: true
  2. class CreateCustomEmojis < ActiveRecord::Migration[5.1]
  3. def change
  4. create_table :custom_emojis do |t|
  5. t.string :shortcode, null: false, default: ''
  6. t.string :domain
  7. # The following corresponds to `t.attachment :image` in an older version of Paperclip
  8. t.string :image_file_name
  9. t.string :image_content_type
  10. t.integer :image_file_size
  11. t.datetime :image_updated_at
  12. t.timestamps
  13. end
  14. add_index :custom_emojis, [:shortcode, :domain], unique: true
  15. end
  16. end