2023-07-12 16:47:08 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-19 09:42:40 +09:00
|
|
|
class CreateCustomEmojis < ActiveRecord::Migration[5.1]
|
|
|
|
def change
|
|
|
|
create_table :custom_emojis do |t|
|
|
|
|
t.string :shortcode, null: false, default: ''
|
|
|
|
t.string :domain
|
2024-05-20 23:59:27 +09:00
|
|
|
|
|
|
|
# The following corresponds to `t.attachment :image` in an older version of Paperclip
|
|
|
|
t.string :image_file_name
|
|
|
|
t.string :image_content_type
|
|
|
|
t.integer :image_file_size
|
|
|
|
t.datetime :image_updated_at
|
2017-09-19 09:42:40 +09:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index :custom_emojis, [:shortcode, :domain], unique: true
|
|
|
|
end
|
|
|
|
end
|