Skip to content

Commit

Permalink
Change migration
Browse files Browse the repository at this point in the history
  • Loading branch information
tspenov committed Feb 7, 2025
1 parent ff7f681 commit 1fa9618
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
defmodule Sanbase.Repo.Migrations.UpdateNotificationTemplatesIndex do
use Ecto.Migration

def change do
drop(unique_index(:notification_templates, [:action, :step, :channel]))
def up do
execute("DROP INDEX IF EXISTS notification_templates_action_type_step_channel_index")
execute("DROP INDEX IF EXISTS notification_templates_action_type_step_index")

create(unique_index(:notification_templates, [:action, :step, :channel, :mime_type]))
end

def down do
:ok
end
end

0 comments on commit 1fa9618

Please sign in to comment.