chore: fix default foreign key name

This commit is contained in:
Zach Daniel 2021-04-13 12:38:39 -04:00
parent 7845126037
commit aa49b0f4ea

View file

@ -1565,7 +1565,7 @@ defmodule AshPostgres.MigrationGenerator do
|> Map.put_new(:on_update, nil) |> Map.put_new(:on_update, nil)
|> Map.update!(:on_delete, &(&1 && String.to_atom(&1))) |> Map.update!(:on_delete, &(&1 && String.to_atom(&1)))
|> Map.update!(:on_update, &(&1 && String.to_atom(&1))) |> Map.update!(:on_update, &(&1 && String.to_atom(&1)))
|> Map.put(:name, Map.get(references, :name) || "#{table}_#{attribute.name}") |> Map.put(:name, Map.get(references, :name) || "#{table}_#{attribute.name}_fkey")
|> Map.put_new(:multitenancy, %{ |> Map.put_new(:multitenancy, %{
attribute: nil, attribute: nil,
strategy: nil, strategy: nil,