-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge with migration step 3 (PR #5036)
- Loading branch information
Showing
3 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
priv/repo/migrations/20250130121019_drop_unique_page_path_constraint_from_goals.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters