fix index names
This commit is contained in:
17
db/migrate/20250722235434_drop_unused_embedding_indexes.rb
Normal file
17
db/migrate/20250722235434_drop_unused_embedding_indexes.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class DropUnusedEmbeddingIndexes < ActiveRecord::Migration[7.2]
|
||||
def up
|
||||
remove_index :domain_user_user_follow_to_factors,
|
||||
name: "index_domain_user_user_follow_to_factors_on_embedding"
|
||||
|
||||
rename_index :domain_user_user_follow_to_factors,
|
||||
"index_domain_user_user_follow_to_factors_on_embedding_hnsw",
|
||||
"index_domain_user_user_follow_to_factors_on_embedding"
|
||||
rename_index :domain_user_post_fav_post_factors,
|
||||
"domain_user_post_fav_post_factors_hnsw_l2_ops",
|
||||
"index_domain_user_post_fav_post_factors_on_embedding"
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
@@ -10,13 +10,6 @@ SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
--
|
||||
-- Name: public; Type: SCHEMA; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
-- *not* creating schema, since initdb creates it
|
||||
|
||||
|
||||
--
|
||||
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
||||
--
|
||||
@@ -3163,13 +3156,6 @@ ALTER TABLE ONLY public.users
|
||||
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: domain_user_post_fav_post_factors_hnsw_l2_ops; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX domain_user_post_fav_post_factors_hnsw_l2_ops ON public.domain_user_post_fav_post_factors USING hnsw (embedding public.vector_l2_ops) WITH (m='16', ef_construction='64');
|
||||
|
||||
|
||||
--
|
||||
-- Name: good_jobs_error_finished_at_idx; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@@ -4017,6 +4003,13 @@ CREATE INDEX index_domain_user_post_creations_on_post_id_and_user_id ON public.d
|
||||
CREATE UNIQUE INDEX index_domain_user_post_creations_on_user_id_and_post_id ON public.domain_user_post_creations USING btree (user_id, post_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_domain_user_post_fav_post_factors_on_embedding; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_domain_user_post_fav_post_factors_on_embedding ON public.domain_user_post_fav_post_factors USING hnsw (embedding public.vector_l2_ops) WITH (m='16', ef_construction='64');
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_domain_user_post_fav_post_factors_on_post_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@@ -4105,14 +4098,7 @@ CREATE UNIQUE INDEX index_domain_user_user_follow_from_factors_on_user_id ON pub
|
||||
-- Name: index_domain_user_user_follow_to_factors_on_embedding; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_domain_user_user_follow_to_factors_on_embedding ON public.domain_user_user_follow_to_factors USING ivfflat (embedding public.vector_cosine_ops) WITH (lists='5000');
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_domain_user_user_follow_to_factors_on_embedding_hnsw; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_domain_user_user_follow_to_factors_on_embedding_hnsw ON public.domain_user_user_follow_to_factors USING hnsw (embedding public.vector_l2_ops) WITH (m='16', ef_construction='64');
|
||||
CREATE INDEX index_domain_user_user_follow_to_factors_on_embedding ON public.domain_user_user_follow_to_factors USING hnsw (embedding public.vector_l2_ops) WITH (m='16', ef_construction='64');
|
||||
|
||||
|
||||
--
|
||||
@@ -5195,6 +5181,7 @@ ALTER TABLE ONLY public.domain_twitter_tweets
|
||||
SET search_path TO "$user", public;
|
||||
|
||||
INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20250722235434'),
|
||||
('20250722153048'),
|
||||
('20250722152949'),
|
||||
('20250722060701'),
|
||||
|
||||
Reference in New Issue
Block a user