20170917153509_create_custom_emojis.rb 314 B

12345678910111213
  1. class CreateCustomEmojis < ActiveRecord::Migration[5.1]
  2. def change
  3. create_table :custom_emojis do |t|
  4. t.string :shortcode, null: false, default: ''
  5. t.string :domain
  6. t.attachment :image
  7. t.timestamps
  8. end
  9. add_index :custom_emojis, [:shortcode, :domain], unique: true
  10. end
  11. end