favgroups: convert post_ids from string to array.

This commit is contained in:
evazion
2020-01-14 23:33:55 -06:00
parent eecd9a183d
commit ab325c5d2b
25 changed files with 141 additions and 288 deletions

View File

@@ -921,8 +921,7 @@ CREATE TABLE public.favorite_groups (
id integer NOT NULL,
name text NOT NULL,
creator_id integer NOT NULL,
post_ids text DEFAULT ''::text NOT NULL,
post_count integer DEFAULT 0 NOT NULL,
post_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
is_public boolean DEFAULT false NOT NULL
@@ -4975,6 +4974,13 @@ CREATE INDEX index_favorite_groups_on_creator_id ON public.favorite_groups USING
CREATE INDEX index_favorite_groups_on_lower_name ON public.favorite_groups USING btree (lower(name));
--
-- Name: index_favorite_groups_on_post_ids; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_favorite_groups_on_post_ids ON public.favorite_groups USING gin (post_ids);
--
-- Name: index_favorites_0_on_post_id; Type: INDEX; Schema: public; Owner: -
--
@@ -7400,6 +7406,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20191117200404'),
('20191119061018'),
('20191223032633'),
('20200114204550');
('20200114204550'),
('20200115010442');