mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 05:23:18 +12:00
chore: format
This commit is contained in:
parent
cb6943b233
commit
b800b2c984
2 changed files with 9 additions and 13 deletions
|
@ -240,9 +240,9 @@ defmodule AshPostgres.MigrationGenerator.Operation do
|
|||
destination_field: destination_field
|
||||
}
|
||||
}) do
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{
|
||||
inspect(destination_field)
|
||||
}, name: \"\#\{prefix()\}_#{table}_#{name}_fkey\")"
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{inspect(destination_field)}, name: \"\#\{prefix()\}_#{
|
||||
table
|
||||
}_#{name}_fkey\")"
|
||||
end
|
||||
|
||||
defp reference(%{strategy: :attribute, attribute: source_attribute}, %{
|
||||
|
@ -253,9 +253,9 @@ defmodule AshPostgres.MigrationGenerator.Operation do
|
|||
destination_field: destination_field
|
||||
}
|
||||
}) do
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{
|
||||
inspect(destination_field)
|
||||
}, with: [#{source_attribute}: :#{destination_attribute}])"
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{inspect(destination_field)}, with: [#{
|
||||
source_attribute
|
||||
}: :#{destination_attribute}])"
|
||||
end
|
||||
|
||||
defp reference(
|
||||
|
@ -268,9 +268,7 @@ defmodule AshPostgres.MigrationGenerator.Operation do
|
|||
}
|
||||
}
|
||||
) do
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{
|
||||
inspect(destination_field)
|
||||
}, prefix(): \"public\")"
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{inspect(destination_field)}, prefix(): \"public\")"
|
||||
end
|
||||
|
||||
defp reference(
|
||||
|
@ -283,9 +281,7 @@ defmodule AshPostgres.MigrationGenerator.Operation do
|
|||
}
|
||||
}
|
||||
) do
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{
|
||||
inspect(destination_field)
|
||||
})"
|
||||
"references(:#{table}, type: #{inspect(type)}, column: #{inspect(destination_field)})"
|
||||
end
|
||||
|
||||
def down(op) do
|
||||
|
|
|
@ -435,7 +435,7 @@ defmodule AshPostgres.MigrationGeneratorTest do
|
|||
|
||||
attributes do
|
||||
uuid_primary_key(:id)
|
||||
attribute :resource_id, :uuid
|
||||
attribute(:resource_id, :uuid)
|
||||
end
|
||||
|
||||
actions do
|
||||
|
|
Loading…
Reference in a new issue