about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-10 14:19:04 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-10 14:19:04 -0600
commit13b4d7953adfa8455f800a56124c7d6ecafa41ca (patch)
tree76fa5d86a2e646c09b08637625cc31aaa2f694b0 /db
parente13202c114eeb7584e776a073a41d9e57ae31e02 (diff)
add ability to toggle individual filters without deleting them
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200110195612_toggleable_filters.rb7
-rw-r--r--db/structure.sql17
2 files changed, 22 insertions, 2 deletions
diff --git a/db/migrate/20200110195612_toggleable_filters.rb b/db/migrate/20200110195612_toggleable_filters.rb
new file mode 100644
index 000000000..4bc521bf3
--- /dev/null
+++ b/db/migrate/20200110195612_toggleable_filters.rb
@@ -0,0 +1,7 @@
+class ToggleableFilters < ActiveRecord::Migration[5.2]
+  def change
+    safety_assured {
+      add_column :custom_filters, :is_enabled, :boolean, null: false, default: true
+    }
+  end
+end
diff --git a/db/structure.sql b/db/structure.sql
index 3ac813d4c..de17e54f8 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -114,6 +114,17 @@ $$;
 
 
 --
+-- Name: tsquery_union(tsquery); Type: AGGREGATE; Schema: public; Owner: -
+--
+
+CREATE AGGREGATE public.tsquery_union(tsquery) (
+    SFUNC = tsquery_or,
+    STYPE = tsquery,
+    PARALLEL = safe
+);
+
+
+--
 -- Name: fedi; Type: TEXT SEARCH CONFIGURATION; Schema: public; Owner: -
 --
 
@@ -862,7 +873,8 @@ CREATE TABLE public.custom_filters (
     expires_at timestamp without time zone,
     phrase text DEFAULT ''::text NOT NULL,
     created_at timestamp without time zone NOT NULL,
-    updated_at timestamp without time zone NOT NULL
+    updated_at timestamp without time zone NOT NULL,
+    is_enabled boolean DEFAULT true NOT NULL
 );
 
 
@@ -5377,6 +5389,7 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20191221195147'),
 ('20200108051211'),
 ('20200109191740'),
-('20200110072034');
+('20200110072034'),
+('20200110195612');