20170917153509_create_custom_emojis.rb 345 B

123456789101112131415
  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. t.attachment :image
  8. t.timestamps
  9. end
  10. add_index :custom_emojis, [:shortcode, :domain], unique: true
  11. end
  12. end