Skip to content

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

Migration: make `goals.custom_props` non-null (#5945)

Adam Rutkowski40f0d4bfbf33
diff --git a/priv/repo/migrations/20251211110619_goals_custom_props_default.exs b/priv/repo/migrations/20251211110619_goals_custom_props_default.exs
new file mode 100644
index 0000000000..e08ac4e235
--- /dev/null
+++ b/priv/repo/migrations/20251211110619_goals_custom_props_default.exs
@@ -0,0 +1,9 @@
+defmodule Plausible.Repo.Migrations.GoalsCustomPropsDefault do
+ use Ecto.Migration
+
+ def change do
+ alter table(:goals) do
+ modify(:custom_props, :map, null: false, default: %{})
+ end
+ end
+end