Skip to content

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

Add teams hourluy api request limit backfill to CE-only migration (#5275)

Adrian Gruntkowski7f52730b71e3
diff --git a/priv/repo/migrations/20250403093826_backfill_teams_hourly_api_request_limit.exs b/priv/repo/migrations/20250403093826_backfill_teams_hourly_api_request_limit.exs
new file mode 100644
index 0000000000..243e6d2fa4
--- /dev/null
+++ b/priv/repo/migrations/20250403093826_backfill_teams_hourly_api_request_limit.exs
@@ -0,0 +1,14 @@
+defmodule Plausible.Repo.Migrations.BackfillTeamsHourlyApiRequestLimit do
+ use Plausible
+ use Ecto.Migration
+
+ def up do
+ if ce?() do
+ Plausible.DataMigration.BackfillTeamsHourlyRequestLimit.run(dry_run?: false)
+ end
+ end
+
+ def down do
+ raise "Irreversible"
+ end
+end