Update migration that failed to run (#5946)
* Update migration that failed to run * !fixup
This commit is contained in:
parent
40f0d4bfbf
commit
c78ddf6ba4
|
|
@ -2,8 +2,23 @@ defmodule Plausible.Repo.Migrations.GoalsCustomPropsDefault do
|
|||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
drop(
|
||||
unique_index(:goals, [:site_id, :event_name, :custom_props],
|
||||
where: "event_name IS NOT NULL",
|
||||
name: :goals_event_config_unique
|
||||
)
|
||||
)
|
||||
|
||||
alter table(:goals) do
|
||||
modify(:custom_props, :map, null: false, default: %{})
|
||||
end
|
||||
remove :custom_props
|
||||
add :custom_props, :map, null: false, default: %{}
|
||||
end
|
||||
|
||||
create(
|
||||
unique_index(:goals, [:site_id, :event_name, :custom_props],
|
||||
where: "event_name IS NOT NULL",
|
||||
name: :goals_event_config_unique
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue