about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-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');