Merge pull request #3989 from evazion/fix-3987
Wiki pages: convert other_names column to array (#3987)
This commit is contained in:
@@ -718,9 +718,9 @@ CREATE TABLE public.artist_versions (
|
||||
updater_id integer NOT NULL,
|
||||
updater_ip_addr inet NOT NULL,
|
||||
is_active boolean DEFAULT true NOT NULL,
|
||||
other_names text,
|
||||
other_names text[] DEFAULT '{}'::text[],
|
||||
group_name character varying,
|
||||
url_string text,
|
||||
urls text[] DEFAULT '{}'::text[],
|
||||
is_banned boolean DEFAULT false NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone
|
||||
@@ -756,8 +756,7 @@ CREATE TABLE public.artists (
|
||||
creator_id integer NOT NULL,
|
||||
is_active boolean DEFAULT true NOT NULL,
|
||||
is_banned boolean DEFAULT false NOT NULL,
|
||||
other_names text,
|
||||
other_names_index tsvector,
|
||||
other_names text[] DEFAULT '{}'::text[],
|
||||
group_name character varying,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone
|
||||
@@ -2971,7 +2970,7 @@ CREATE TABLE public.tag_implications (
|
||||
id integer NOT NULL,
|
||||
antecedent_name character varying NOT NULL,
|
||||
consequent_name character varying NOT NULL,
|
||||
descendant_names text NOT NULL,
|
||||
descendant_names text[] DEFAULT '{}'::text[] NOT NULL,
|
||||
creator_id integer NOT NULL,
|
||||
creator_ip_addr inet NOT NULL,
|
||||
forum_topic_id integer,
|
||||
@@ -3314,7 +3313,7 @@ CREATE TABLE public.wiki_page_versions (
|
||||
is_locked boolean NOT NULL,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
other_names text,
|
||||
other_names text[] DEFAULT '{}'::text[],
|
||||
is_deleted boolean DEFAULT false NOT NULL
|
||||
);
|
||||
|
||||
@@ -3352,8 +3351,7 @@ CREATE TABLE public.wiki_pages (
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone,
|
||||
updater_id integer,
|
||||
other_names text,
|
||||
other_names_index tsvector,
|
||||
other_names text[] DEFAULT '{}'::text[],
|
||||
is_deleted boolean DEFAULT false NOT NULL
|
||||
);
|
||||
|
||||
@@ -5028,17 +5026,10 @@ CREATE INDEX index_artists_on_name_trgm ON public.artists USING gin (name public
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_artists_on_other_names_index; Type: INDEX; Schema: public; Owner: -
|
||||
-- Name: index_artists_on_other_names; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_artists_on_other_names_index ON public.artists USING gin (other_names_index);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_artists_on_other_names_trgm; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_artists_on_other_names_trgm ON public.artists USING gin (other_names public.gin_trgm_ops);
|
||||
CREATE INDEX index_artists_on_other_names ON public.artists USING gin (other_names);
|
||||
|
||||
|
||||
--
|
||||
@@ -7261,10 +7252,10 @@ CREATE INDEX index_wiki_pages_on_body_index_index ON public.wiki_pages USING gin
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_wiki_pages_on_other_names_index; Type: INDEX; Schema: public; Owner: -
|
||||
-- Name: index_wiki_pages_on_other_names; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_wiki_pages_on_other_names_index ON public.wiki_pages USING gin (other_names_index);
|
||||
CREATE INDEX index_wiki_pages_on_other_names ON public.wiki_pages USING gin (other_names);
|
||||
|
||||
|
||||
--
|
||||
@@ -7295,13 +7286,6 @@ CREATE INDEX index_wiki_pages_on_updated_at ON public.wiki_pages USING btree (up
|
||||
CREATE TRIGGER insert_favorites_trigger BEFORE INSERT ON public.favorites FOR EACH ROW EXECUTE PROCEDURE public.favorites_insert_trigger();
|
||||
|
||||
|
||||
--
|
||||
-- Name: artists trigger_artists_on_update; Type: TRIGGER; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TRIGGER trigger_artists_on_update BEFORE INSERT OR UPDATE ON public.artists FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('other_names_index', 'public.danbooru', 'other_names');
|
||||
|
||||
|
||||
--
|
||||
-- Name: comments trigger_comments_on_update; Type: TRIGGER; Schema: public; Owner: -
|
||||
--
|
||||
@@ -7351,13 +7335,6 @@ CREATE TRIGGER trigger_posts_on_tag_index_update BEFORE INSERT OR UPDATE ON publ
|
||||
CREATE TRIGGER trigger_wiki_pages_on_update BEFORE INSERT OR UPDATE ON public.wiki_pages FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('body_index', 'public.danbooru', 'body', 'title');
|
||||
|
||||
|
||||
--
|
||||
-- Name: wiki_pages trigger_wiki_pages_on_update_for_other_names; Type: TRIGGER; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TRIGGER trigger_wiki_pages_on_update_for_other_names BEFORE INSERT OR UPDATE ON public.wiki_pages FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('other_names_index', 'public.danbooru', 'other_names');
|
||||
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
@@ -7528,6 +7505,10 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20180913184128'),
|
||||
('20180916002448'),
|
||||
('20181108162204'),
|
||||
('20181108205842');
|
||||
('20181108205842'),
|
||||
('20181113174914'),
|
||||
('20181114180205'),
|
||||
('20181114185032'),
|
||||
('20181114202744');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user