We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb93a8f commit f9d1329Copy full SHA for f9d1329
lib/migration_generator/phase.ex
@@ -19,12 +19,18 @@ defmodule AshPostgres.MigrationGenerator.Phase do
19
Enum.map_join(operations, "\n", fn operation -> operation.__struct__.up(operation) end) <>
20
"\nend"
21
else
22
- {pre_create, opts} =
+ pre_create =
23
if schema && repo.create_schemas_in_migrations?() do
24
- {"execute(\"CREATE SCHEMA IF NOT EXISTS #{schema}\")" <> "\n\n",
25
- ", prefix: \"#{schema}\""}
+ "execute(\"CREATE SCHEMA IF NOT EXISTS #{schema}\")" <> "\n\n"
26
27
- {"", ""}
+ ""
+ end
28
+
29
+ opts =
30
+ if schema do
31
+ ", prefix: \"#{schema}\""
32
+ else
33
34
end
35
36
pre_create <>
0 commit comments