fix: reroute Ash.Type.UUID to :uuid in migrations

This commit is contained in:
Zach Daniel 2021-03-21 13:23:30 -04:00
parent 09b2ee6b59
commit 2280b1e439

View file

@ -1291,6 +1291,7 @@ defmodule AshPostgres.MigrationGenerator do
defp migration_type({:array, type}), do: {:array, migration_type(type)}
defp migration_type(Ash.Type.CiString), do: :citext
defp migration_type(Ash.Type.UUID), do: :uuid
defp migration_type(other), do: migration_type_from_storage_type(Ash.Type.storage_type(other))
defp migration_type_from_storage_type(:string), do: :text
defp migration_type_from_storage_type(storage_type), do: storage_type