Skip to content

Commit acdf943

Browse files
authored
Accept prefix option for PostgreSQL v04 migration (#121)
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.
1 parent 489aa68 commit acdf943

File tree

1 file changed

+4
-4
lines changed
  • lib/error_tracker/migration/postgres

1 file changed

+4
-4
lines changed

lib/error_tracker/migration/postgres/v04.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ defmodule ErrorTracker.Migration.Postgres.V04 do
33

44
use Ecto.Migration
55

6-
def up(_opts) do
7-
alter table(:error_tracker_occurrences) do
6+
def up(%{prefix: prefix}) do
7+
alter table(:error_tracker_occurrences, prefix: prefix) do
88
add :breadcrumbs, {:array, :string}, default: [], null: false
99
end
1010
end
1111

12-
def down(_opts) do
13-
alter table(:error_tracker_occurrences) do
12+
def down(%{prefix: prefix}) do
13+
alter table(:error_tracker_occurrences, prefix: prefix) do
1414
remove :breadcrumbs
1515
end
1616
end

0 commit comments

Comments
 (0)