Skip to content

Commit

Permalink
add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertJoonas committed Jan 30, 2025
1 parent 3d0a131 commit 852a3c4
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
defmodule Plausible.Repo.Migrations.DropUniquePagePathConstraintFromGoals do
use Ecto.Migration

@disable_ddl_transaction true
@disable_migration_lock true

# Plausible.Repo.Migrations.GoalsUnique
@old_index unique_index(
:goals,
[:site_id, :page_path],
where: "page_path IS NOT NULL",
name: :goals_page_path_unique
)

def up do
drop(@old_index)
end

def down do
create(@old_index)
end
end

0 comments on commit 852a3c4

Please sign in to comment.