Skip to content

A platform for community discussion. Free, open, simple.

PERF: Remove foreign keys from bookmarks (#9837)

Martin Brennane334133294b2
diff --git a/db/post_migrate/20200520001619_remove_fks_from_bookmarks.rb b/db/post_migrate/20200520001619_remove_fks_from_bookmarks.rb
new file mode 100644
index 00000000000..80fee6dab4f
--- /dev/null
+++ b/db/post_migrate/20200520001619_remove_fks_from_bookmarks.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class RemoveFksFromBookmarks < ActiveRecord::Migration[6.0]
+ def change
+ remove_foreign_key :bookmarks, :topics
+ remove_foreign_key :bookmarks, :posts
+ remove_foreign_key :bookmarks, :users
+ end
+end