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:
Scott Barron
2006-03-26 22:15:19 +00:00
parent 0c07e08d60
commit 8935209629

View File

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