Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

align index names if error

Brian Cao8c504ff9230c
diff --git a/db/postgresql/migrations/02_add_event_data/migration.sql b/db/postgresql/migrations/02_add_event_data/migration.sql
index 62587e29b..24c22e354 100644
--- a/db/postgresql/migrations/02_add_event_data/migration.sql
+++ b/db/postgresql/migrations/02_add_event_data/migration.sql
@@ -54,13 +54,13 @@ CREATE UNIQUE INDEX "event_data_event_id_key" ON "event_data"("event_id");
ALTER TABLE "event_data" ADD CONSTRAINT "event_data_event_id_fkey" FOREIGN KEY ("event_id") REFERENCES "event"("event_id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- RenameIndex
-ALTER INDEX "account.username_unique" RENAME TO "account_username_key";
+ALTER INDEX IF EXISTS "account.username_unique" RENAME TO "account_username_key";
-- RenameIndex
-ALTER INDEX "session.session_uuid_unique" RENAME TO "session_session_uuid_key";
+ALTER INDEX IF EXISTS "session.session_uuid_unique" RENAME TO "session_session_uuid_key";
-- RenameIndex
-ALTER INDEX "website.share_id_unique" RENAME TO "website_share_id_key";
+ALTER INDEX IF EXISTS "website.share_id_unique" RENAME TO "website_share_id_key";
-- RenameIndex
-ALTER INDEX "website.website_uuid_unique" RENAME TO "website_website_uuid_key";
\ No newline at end of file
+ALTER INDEX IF EXISTS "website.website_uuid_unique" RENAME TO "website_website_uuid_key";
\ No newline at end of file