Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Migration: index for caching consolidated views (#5752)

Adam Rutkowski63a89cab8e7d
diff --git a/priv/repo/migrations/20250924110527_consolidated_view_site_ids_index.exs b/priv/repo/migrations/20250924110527_consolidated_view_site_ids_index.exs
new file mode 100644
index 0000000000..ddbc9c36e9
--- /dev/null
+++ b/priv/repo/migrations/20250924110527_consolidated_view_site_ids_index.exs
@@ -0,0 +1,7 @@
+defmodule Plausible.Repo.Migrations.ConsolidatedViewSiteIdsIndex do
+ use Ecto.Migration
+
+ def change do
+ create index(:sites, [:team_id, :consolidated, :id])
+ end
+end