discourse/plugins/chat/db/migrate/20210823160357_create_chat_webhook_events.rb
Roman Rizzi 0a5f548635
DEV: Move discourse-chat to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
2022-11-02 10:41:30 -03:00

16 lines
460 B
Ruby

# frozen_string_literal: true
class CreateChatWebhookEvents < ActiveRecord::Migration[6.1]
def change
create_table :chat_webhook_events do |t|
t.integer :chat_message_id, null: false
t.integer :incoming_chat_webhook_id, null: false
t.timestamps
end
add_index :chat_webhook_events,
%i[chat_message_id incoming_chat_webhook_id],
unique: true,
name: "chat_webhook_events_index"
end
end