Skip to content

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

Add unique index to monthly reports site id

Uku Taht4b29735c0c5f
diff --git a/priv/repo/migrations/20191216064647_add_unique_index_to_email_reports.exs b/priv/repo/migrations/20191216064647_add_unique_index_to_email_reports.exs
new file mode 100644
index 0000000000..cbaa056d4b
--- /dev/null
+++ b/priv/repo/migrations/20191216064647_add_unique_index_to_email_reports.exs
@@ -0,0 +1,8 @@
+defmodule Plausible.Repo.Migrations.AddUniqueIndexToEmailReports do
+ use Ecto.Migration
+ use Plausible.Repo
+
+ def change do
+ create unique_index(:monthly_reports, :site_id)
+ end
+end