From 40a2f2b652a8f08d17cfd7906715610b793c4093 Mon Sep 17 00:00:00 2001 From: mindok Date: Mon, 8 Jan 2024 16:40:00 +1100 Subject: [PATCH] fix: make polymorphic relationhip name consistent --- lib/migration_generator/migration_generator.ex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/migration_generator/migration_generator.ex b/lib/migration_generator/migration_generator.ex index ef3d0389..69406633 100644 --- a/lib/migration_generator/migration_generator.ex +++ b/lib/migration_generator/migration_generator.ex @@ -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