about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-24 09:16:36 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-24 09:16:36 -0600
commitefe4a749a841fd794bfc4475b9864e046e786774 (patch)
tree4504d8e4026d58337b3a0e6a5823fb452cdc86bd
parent5d67d426645bc8b7b50f58024a82ffbbcdf9bd14 (diff)
add migration to force-remove `curated` flag from visibilities that should not be curatable - bug fixed by `5d67d42`
-rw-r--r--db/migrate/20200224150903_remove_curated_flag_on_non_distributable_statuses.rb9
-rw-r--r--db/structure.sql57
2 files changed, 65 insertions, 1 deletions
diff --git a/db/migrate/20200224150903_remove_curated_flag_on_non_distributable_statuses.rb b/db/migrate/20200224150903_remove_curated_flag_on_non_distributable_statuses.rb
new file mode 100644
index 000000000..45cc2a26d
--- /dev/null
+++ b/db/migrate/20200224150903_remove_curated_flag_on_non_distributable_statuses.rb
@@ -0,0 +1,9 @@
+class RemoveCuratedFlagOnNonDistributableStatuses < ActiveRecord::Migration[5.2]
+  def up
+    Status.where(visibility: [:private, :limited, :direct], curated: true).in_batches.update_all(curated: false)
+  end
+
+  def down
+    false
+  end
+end
diff --git a/db/structure.sql b/db/structure.sql
index 3bd504a46..937ad905e 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -960,6 +960,37 @@ ALTER SEQUENCE public.destructing_statuses_id_seq OWNED BY public.destructing_st
 
 
 --
+-- Name: domain_allows; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.domain_allows (
+    id bigint NOT NULL,
+    domain character varying DEFAULT ''::character varying NOT NULL,
+    created_at timestamp without time zone NOT NULL,
+    updated_at timestamp without time zone NOT NULL
+);
+
+
+--
+-- Name: domain_allows_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.domain_allows_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: domain_allows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.domain_allows_id_seq OWNED BY public.domain_allows.id;
+
+
+--
 -- Name: domain_blocks; Type: TABLE; Schema: public; Owner: -
 --
 
@@ -2644,6 +2675,13 @@ ALTER TABLE ONLY public.destructing_statuses ALTER COLUMN id SET DEFAULT nextval
 
 
 --
+-- Name: domain_allows id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.domain_allows ALTER COLUMN id SET DEFAULT nextval('public.domain_allows_id_seq'::regclass);
+
+
+--
 -- Name: domain_blocks id; Type: DEFAULT; Schema: public; Owner: -
 --
 
@@ -3107,6 +3145,14 @@ ALTER TABLE ONLY public.destructing_statuses
 
 
 --
+-- Name: domain_allows domain_allows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.domain_allows
+    ADD CONSTRAINT domain_allows_pkey PRIMARY KEY (id);
+
+
+--
 -- Name: domain_blocks domain_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
@@ -3731,6 +3777,13 @@ CREATE UNIQUE INDEX index_destructing_statuses_on_status_id ON public.destructin
 
 
 --
+-- Name: index_domain_allows_on_domain; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE UNIQUE INDEX index_domain_allows_on_domain ON public.domain_allows USING btree (domain);
+
+
+--
 -- Name: index_domain_blocks_on_domain; Type: INDEX; Schema: public; Owner: -
 --
 
@@ -5359,6 +5412,7 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20190531082452'),
 ('20190531084425'),
 ('20190701022101'),
+('20190705002136'),
 ('20190706233204'),
 ('20190714172440'),
 ('20190714172721'),
@@ -5430,6 +5484,7 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20200217055054'),
 ('20200218032023'),
 ('20200218033651'),
-('20200218070510');
+('20200218070510'),
+('20200224150903');