about summary refs log tree commit diff
path: root/db/post_migrate/20180813160548_post_migrate_filters.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-08-13 18:17:48 +0200
committerThibG <thib@sitedethib.com>2018-08-16 20:30:09 +0200
commit80148d8edde56bb21869e055ed83b38d81e919f3 (patch)
tree8b39c28ef6687e43ea3d9b5940ef26221a224d9f /db/post_migrate/20180813160548_post_migrate_filters.rb
parent494eaab5b137cb69122566d6e65f001c0e969deb (diff)
Split custom filter migration script using the post-deployment migration system
There were some concerns with the custom filter migration script dropping a table,
thus making it unsafe to run in a zero-downtime setting. Upstream introduced
a way to run migrations after deployment, so revisit the old migration script to
make use of this.
Diffstat (limited to 'db/post_migrate/20180813160548_post_migrate_filters.rb')
-rw-r--r--db/post_migrate/20180813160548_post_migrate_filters.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/post_migrate/20180813160548_post_migrate_filters.rb b/db/post_migrate/20180813160548_post_migrate_filters.rb
new file mode 100644
index 000000000..588548c1d
--- /dev/null
+++ b/db/post_migrate/20180813160548_post_migrate_filters.rb
@@ -0,0 +1,11 @@
+class PostMigrateFilters < ActiveRecord::Migration[5.2]
+  disable_ddl_transaction!
+
+  def up
+    drop_table :glitch_keyword_mutes if table_exists? :glitch_keyword_mutes
+  end
+
+  def down
+  end
+end
+