diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-15 13:34:05 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-15 14:12:24 -0500 |
commit | cf3ec71aa564c7fe47ec79f8dd5f14e3bce0b85c (patch) | |
tree | 49a3356c4177157b377aeca223a7d1c1e2e3dc17 /db/migrate/20190526052454_create_chat_accounts.rb | |
parent | 0a5eba734e6aa6a6e7e8f64b022af8ea129c9f5d (diff) |
local visibility scope, chat scope+tags, unlisted tags
Diffstat (limited to 'db/migrate/20190526052454_create_chat_accounts.rb')
-rw-r--r-- | db/migrate/20190526052454_create_chat_accounts.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 |