From cf3ec71aa564c7fe47ec79f8dd5f14e3bce0b85c Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 15 Jul 2019 13:34:05 -0500 Subject: local visibility scope, chat scope+tags, unlisted tags --- db/migrate/20190526052454_create_chat_accounts.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20190526052454_create_chat_accounts.rb (limited to 'db/migrate/20190526052454_create_chat_accounts.rb') diff --git a/db/migrate/20190526052454_create_chat_accounts.rb b/db/migrate/20190526052454_create_chat_accounts.rb new file mode 100644 index 000000000..b950e36c1 --- /dev/null +++ b/db/migrate/20190526052454_create_chat_accounts.rb @@ -0,0 +1,11 @@ +class CreateChatAccounts < ActiveRecord::Migration[5.2] + def change + create_table :chat_accounts do |t| + t.references :account, foreign_key: { on_delete: :cascade }, null: false + t.references :tag, foreign_key: { on_delete: :cascade }, null: false + t.index [:account_id, :tag_id], unique: true + t.index [:tag_id, :account_id] + t.timestamps + end + end +end -- cgit