From efe4a749a841fd794bfc4475b9864e046e786774 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 24 Feb 2020 09:16:36 -0600 Subject: add migration to force-remove `curated` flag from visibilities that should not be curatable - bug fixed by `5d67d42` --- ...e_curated_flag_on_non_distributable_statuses.rb | 9 ++++ db/structure.sql | 57 +++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20200224150903_remove_curated_flag_on_non_distributable_statuses.rb 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 @@ -959,6 +959,37 @@ CREATE SEQUENCE public.destructing_statuses_id_seq ALTER SEQUENCE public.destructing_statuses_id_seq OWNED BY public.destructing_statuses.id; +-- +-- 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: - -- @@ -2643,6 +2674,13 @@ ALTER TABLE ONLY public.defederating_statuses ALTER COLUMN id SET DEFAULT nextva ALTER TABLE ONLY public.destructing_statuses ALTER COLUMN id SET DEFAULT nextval('public.destructing_statuses_id_seq'::regclass); +-- +-- 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: - -- @@ -3106,6 +3144,14 @@ ALTER TABLE ONLY public.destructing_statuses ADD CONSTRAINT destructing_statuses_pkey PRIMARY KEY (id); +-- +-- 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: - -- @@ -3730,6 +3776,13 @@ CREATE INDEX index_destructing_statuses_on_delete_after ON public.destructing_st CREATE UNIQUE INDEX index_destructing_statuses_on_status_id ON public.destructing_statuses USING btree (status_id); +-- +-- 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'); -- cgit