summaryrefslogtreecommitdiff
path: root/db/post_migrate/20210107194543_remove_alerts_service_records.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20210107194543_remove_alerts_service_records.rb')
-rw-r--r--db/post_migrate/20210107194543_remove_alerts_service_records.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/post_migrate/20210107194543_remove_alerts_service_records.rb b/db/post_migrate/20210107194543_remove_alerts_service_records.rb
new file mode 100644
index 00000000000..51a2f96ac7f
--- /dev/null
+++ b/db/post_migrate/20210107194543_remove_alerts_service_records.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class RemoveAlertsServiceRecords < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ class Service < ActiveRecord::Base
+ self.table_name = 'services'
+ end
+
+ def up
+ Service.delete_by(type: 'AlertsService')
+ end
+
+ def down
+ # no-op
+ end
+end