mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Added extra comment when a migration already exists of the same name.
User should know that he can overwrite the previous migration. This comes in handy especially when generating models which were previously created then removed.
This commit is contained in:
parent
9d023c87de
commit
b4c99ea0a4
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ module Rails
|
|||
if destination && options.force?
|
||||
remove_file(destination)
|
||||
elsif destination
|
||||
raise Error, "Another migration is already named #{@migration_file_name}: #{destination}"
|
||||
raise Error, "Another migration is already named #{@migration_file_name}: #{destination}. Use --force to remove the old migration file and replace it."
|
||||
end
|
||||
destination = File.join(migration_dir, "#{@migration_number}_#{@migration_file_name}.rb")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue