mirror of
https://github.com/github/rails.git
synced 2026-02-10 22:25:02 -05:00
Don't raise when the migration file is missing or it'll stop destroy model in
the middle if there is no matching migration file. Closes #4426 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -428,7 +428,11 @@ end_message
|
||||
migration_directory relative_destination
|
||||
|
||||
migration_file_name = template_options[:migration_file_name] || file_name
|
||||
raise "There is no migration named #{migration_file_name}" unless migration_exists?(migration_file_name)
|
||||
unless migration_exists?(migration_file_name)
|
||||
puts "There is no migration named #{migration_file_name}"
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
existing_migrations(migration_file_name).each do |file_path|
|
||||
file(relative_source, file_path, template_options)
|
||||
|
||||
Reference in New Issue
Block a user