Skip to content

Commit 866e5a2

Browse files
committed
chore: fix for recently added source renaming handling
1 parent 2c74df3 commit 866e5a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/migration_generator/migration_generator.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,8 +2312,7 @@ defmodule AshPostgres.MigrationGenerator do
23122312
end
23132313
end)
23142314

2315-
(renaming_to_source || old_attribute.source) ==
2316-
attribute.source &&
2315+
if (renaming_to_source || old_attribute.source) == attribute.source do
23172316
attributes_unequal?(
23182317
old_attribute,
23192318
attribute,
@@ -2322,6 +2321,7 @@ defmodule AshPostgres.MigrationGenerator do
23222321
snapshot,
23232322
not is_nil(renaming_to_source)
23242323
)
2324+
end
23252325
end
23262326
)}
23272327
end)
@@ -2537,7 +2537,7 @@ defmodule AshPostgres.MigrationGenerator do
25372537

25382538
right =
25392539
if ignore_names? do
2540-
Map.drop(left, [:source, :name])
2540+
Map.drop(right, [:source, :name])
25412541
else
25422542
right
25432543
end

0 commit comments

Comments
 (0)