Commit e5eea0b
authored
Use explicit column name for FK references (#62)
The ErrorTracker tables use `id` as the primary key name. This was
causing trouble when the client repository was configured to use a
different column name for references since it tried to create a foreign
key pointing to a non-existing column.
This commit explicitly states the referenced column name to avoid this
problems.
To check this you can create a new Phoenix application that uses the
error tracker and add the following configuration to the application
repository:
```elixir
config :my_app, MyApp.Repo,
migration_primary_key: [name: :uuid, type: :binary_id],
migration_foreign_key: [column: :uuid, type: :binary_id]
```
Trying this on `main` will raise an error when running the migrations.
The error is not present in this branch.
Closes #591 parent cfb9e59 commit e5eea0b
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments