mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
fix: don't reference polymorphic tables to belongs_to relationships
This commit is contained in:
parent
7d20669486
commit
3fa60c68ea
1 changed files with 1 additions and 0 deletions
|
@ -1090,6 +1090,7 @@ defmodule AshPostgres.MigrationGenerator do
|
|||
all_resources
|
||||
|> Enum.flat_map(&Ash.Resource.relationships/1)
|
||||
|> Enum.filter(&(&1.destination == resource))
|
||||
|> Enum.reject(&(&1.type == :belongs_to))
|
||||
|> Enum.filter(& &1.context[:data_layer][:table])
|
||||
|> Enum.map(fn relationship ->
|
||||
resource
|
||||
|
|
Loading…
Reference in a new issue