analytics/priv/repo/migrations/20230410070312_fixup_goals_sites_assoc.exs
hq1 c04e9286dd
Associate goals with sites, not domains (#2828)
* Revert "Rephrase error message"

This reverts commit f624443a96.

* Revert "Temporarily disable goal creation"

This reverts commit a091635b9d.

* Update ecto schema

* Make sure goal operations are per site

* Update tests

* Split postgres migrations
2023-04-10 10:51:36 +02:00

11 lines
243 B
Elixir

defmodule Plausible.Repo.Migrations.FixupGoalsSitesAssoc do
use Ecto.Migration
def change do
alter table(:goals) do
modify :site_id, references(:sites, on_delete: :delete_all), null: false
remove :domain
end
end
end