about summary refs log tree commit diff
path: root/db/migrate/20170917153509_create_custom_emojis.rb
blob: 4040c831255aa1421b4d3c166a256c471ad7bdc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
class CreateCustomEmojis < ActiveRecord::Migration[5.1]
  def change
    create_table :custom_emojis do |t|
      t.string :shortcode, null: false, default: ''
      t.string :domain
      t.attachment :image

      t.timestamps
    end

    add_index :custom_emojis, [:shortcode, :domain], unique: true
  end
end