Skip to content

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

Add migration adding `teams.policy` to CE (#5868)

Adrian Gruntkowski592dc8ed9740
diff --git a/priv/repo/migrations/20251103150703_add_teams_policy_to_ce.exs b/priv/repo/migrations/20251103150703_add_teams_policy_to_ce.exs
new file mode 100644
index 0000000000..cb322d554c
--- /dev/null
+++ b/priv/repo/migrations/20251103150703_add_teams_policy_to_ce.exs
@@ -0,0 +1,13 @@
+defmodule Plausible.Repo.Migrations.AddTeamsPolicyToCe do
+ use Ecto.Migration
+
+ import Plausible.MigrationUtils
+
+ def change do
+ if community_edition?() do
+ alter table(:teams) do
+ add :policy, :jsonb, null: false, default: "{}"
+ end
+ end
+ end
+end