about summary refs log tree commit diff
path: root/db/migrate/20181203003808_create_accounts_tags_join_table.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-12-09 13:28:09 +0100
committerThibaut Girka <thib@sitedethib.com>2018-12-09 16:08:04 +0100
commite7f1bfdc2d528f137299ba0c3ab2a30f2f91f53c (patch)
tree2693ffce4d340a9b77a7ca52c856aaae7af8c913 /db/migrate/20181203003808_create_accounts_tags_join_table.rb
parente3682c9c1750e5e7e5d2f817e29f6760a18400ca (diff)
parent81bda7d67c984c9bfcb5bca94e50cec6405b492e (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/javascript/packs/public.js
- app/models/user.rb
- config/settings.yml
- db/schema.rb

Moved public.js changes to settings.js.
Diffstat (limited to 'db/migrate/20181203003808_create_accounts_tags_join_table.rb')
-rw-r--r--db/migrate/20181203003808_create_accounts_tags_join_table.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20181203003808_create_accounts_tags_join_table.rb b/db/migrate/20181203003808_create_accounts_tags_join_table.rb
new file mode 100644
index 000000000..3c275c2b7
--- /dev/null
+++ b/db/migrate/20181203003808_create_accounts_tags_join_table.rb
@@ -0,0 +1,8 @@
+class CreateAccountsTagsJoinTable < ActiveRecord::Migration[5.2]
+  def change
+    create_join_table :accounts, :tags do |t|
+      t.index [:account_id, :tag_id]
+      t.index [:tag_id, :account_id], unique: true
+    end
+  end
+end