tags: add index on is_deprecated.
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
class AddIsDeprecatedIndexOnTags < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_index :tags, :is_deprecated, where: "is_deprecated = TRUE"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1882,7 +1882,8 @@ CREATE TABLE public.tags (
|
|||||||
category integer DEFAULT 0 NOT NULL,
|
category integer DEFAULT 0 NOT NULL,
|
||||||
created_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
updated_at timestamp without time zone NOT NULL,
|
updated_at timestamp without time zone NOT NULL,
|
||||||
is_locked boolean DEFAULT false NOT NULL
|
is_locked boolean DEFAULT false NOT NULL,
|
||||||
|
is_deprecated boolean DEFAULT false NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -4505,6 +4506,13 @@ CREATE INDEX index_tag_implications_on_consequent_name ON public.tag_implication
|
|||||||
CREATE INDEX index_tag_implications_on_forum_post_id ON public.tag_implications USING btree (forum_post_id);
|
CREATE INDEX index_tag_implications_on_forum_post_id ON public.tag_implications USING btree (forum_post_id);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_tags_on_is_deprecated; Type: INDEX; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX index_tags_on_is_deprecated ON public.tags USING btree (is_deprecated) WHERE (is_deprecated = true);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: index_tags_on_name; Type: INDEX; Schema: public; Owner: -
|
-- Name: index_tags_on_name; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@@ -5797,6 +5805,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||||||
('20220318082614'),
|
('20220318082614'),
|
||||||
('20220403042706'),
|
('20220403042706'),
|
||||||
('20220403220558'),
|
('20220403220558'),
|
||||||
('20220407203236');
|
('20220407203236'),
|
||||||
|
('20220410050628');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user