chore: format

This commit is contained in:
Zach Daniel 2021-02-06 15:21:52 -05:00
parent cb6943b233
commit b800b2c984
2 changed files with 9 additions and 13 deletions

View file

@ -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

View file

@ -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