Skip to content

Commit 3f837d1

Browse files
committed
improvement: assume not renaming when generating dev migrations
1 parent e415d9e commit 3f837d1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/migration_generator/migration_generator.ex

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2960,10 +2960,14 @@ defmodule AshPostgres.MigrationGenerator do
29602960
end
29612961

29622962
defp renaming?(table, removing, opts) do
2963-
if opts.no_shell? do
2964-
raise "Unimplemented: cannot determine: Are you renaming #{table}.#{removing.source}? without shell input"
2963+
if opts.dev do
2964+
if opts.no_shell? do
2965+
raise "Unimplemented: cannot determine: Are you renaming #{table}.#{removing.source}? without shell input"
2966+
else
2967+
yes?(opts, "Are you renaming #{table}.#{removing.source}?")
2968+
end
29652969
else
2966-
yes?(opts, "Are you renaming #{table}.#{removing.source}?")
2970+
false
29672971
end
29682972
end
29692973

0 commit comments

Comments
 (0)