Skip to content

Commit

Permalink
Accept prefix option for PostgreSQL v04 migration (#121)
Browse files Browse the repository at this point in the history
The latest migration for PostgreSQL ignores the `prefix` option, causing
the migration to fail when previous migrations were not using the
`public` schema. This PR adds the `prefix` option to the `v04`
migration.
  • Loading branch information
logandk authored Dec 24, 2024
1 parent 489aa68 commit acdf943
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/error_tracker/migration/postgres/v04.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ defmodule ErrorTracker.Migration.Postgres.V04 do

use Ecto.Migration

def up(_opts) do
alter table(:error_tracker_occurrences) do
def up(%{prefix: prefix}) do
alter table(:error_tracker_occurrences, prefix: prefix) do
add :breadcrumbs, {:array, :string}, default: [], null: false
end
end

def down(_opts) do
alter table(:error_tracker_occurrences) do
def down(%{prefix: prefix}) do
alter table(:error_tracker_occurrences, prefix: prefix) do
remove :breadcrumbs
end
end
Expand Down

0 comments on commit acdf943

Please sign in to comment.