Skip to content

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

DEV: Clear duplicate admin problem notices (#29358)

Ted Johanssonca9549b04f5f
diff --git a/db/post_migrate/20241023041126_clear_duplicate_admin_notices.rb b/db/post_migrate/20241023041126_clear_duplicate_admin_notices.rb
new file mode 100644
index 00000000000..670259d232f
--- /dev/null
+++ b/db/post_migrate/20241023041126_clear_duplicate_admin_notices.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+class ClearDuplicateAdminNotices < ActiveRecord::Migration[7.1]
+ def up
+ problem_subject_id = 0
+
+ DB.exec(<<~SQL)
+ DELETE FROM admin_notices
+ WHERE subject = #{problem_subject_id}
+ SQL
+ end
+end