Skip to content

Commit

Permalink
fix: make polymorphic relationhip name consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
mindok committed Jan 8, 2024
1 parent 65180ec commit 40a2f2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/migration_generator/migration_generator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2372,8 +2372,7 @@ defmodule AshPostgres.MigrationGenerator do
on_update: AshPostgres.DataLayer.Info.polymorphic_on_update(relationship.source),
primary_key?: source_attribute.primary_key?,
name:
AshPostgres.DataLayer.Info.polymorphic_name(relationship.source) ||
"#{relationship.context[:data_layer][:table]}_#{destination_attribute_source}_fkey"
"#{relationship.context[:data_layer][:table]}_#{destination_attribute_source}_fkey"
})
else
attribute
Expand Down

0 comments on commit 40a2f2b

Please sign in to comment.