From d1a87177a58664da0c420e17764e297fdb74ffa9 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 4 Mar 2024 12:01:32 -0300 Subject: [PATCH] fix: eliminar indice unico en realidad lo queremos mantener... --- ...240301194154_remove_unique_index_from_activity_pubs.rb | 8 ++++++++ db/structure.sql | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 db/migrate/20240301194154_remove_unique_index_from_activity_pubs.rb diff --git a/db/migrate/20240301194154_remove_unique_index_from_activity_pubs.rb b/db/migrate/20240301194154_remove_unique_index_from_activity_pubs.rb new file mode 100644 index 00000000..0fa80e60 --- /dev/null +++ b/db/migrate/20240301194154_remove_unique_index_from_activity_pubs.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +# A veces tenemos varias acciones sobre el mismo objeto +class RemoveUniqueIndexFromActivityPubs < ActiveRecord::Migration[6.1] + def change + remove_index :activity_pubs, %i[site_id object_id object_type], unique: true + end +end diff --git a/db/structure.sql b/db/structure.sql index ca3a868b..ff6cf895 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2167,13 +2167,6 @@ CREATE INDEX index_activity_pub_remote_flags_on_site_id ON public.activity_pub_r CREATE UNIQUE INDEX index_activity_pub_remote_flags_on_site_id_and_actor_id ON public.activity_pub_remote_flags USING btree (site_id, actor_id); --- --- Name: index_activity_pubs_on_site_id_and_object_id_and_object_type; Type: INDEX; Schema: public; Owner: - --- - -CREATE UNIQUE INDEX index_activity_pubs_on_site_id_and_object_id_and_object_type ON public.activity_pubs USING btree (site_id, object_id, object_type); - - -- -- Name: index_actor_moderations_on_actor_id; Type: INDEX; Schema: public; Owner: - -- @@ -2701,6 +2694,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20240228202830'), ('20240229201155'), ('20240301181224'), +('20240301194154'), ('20240301202955');