1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

added rake db:create that executes mysql:build_databases and postgresql:build_databases

This commit is contained in:
Ranjay Krishna 2013-01-20 09:41:49 -08:00
parent 760b8d37d4
commit 9f789364b2

View file

@ -39,6 +39,15 @@ namespace :test do
end end
end end
namespace :db do
task :create do
puts "*** creating mysql databases now ***"
Rake::Task['mysql:build_databases'].execute
puts "*** creating postgresql databases now ***"
Rake::Task['postgresql:build_databases'].execute
end
end
%w( mysql mysql2 postgresql sqlite3 sqlite3_mem firebird db2 oracle sybase openbase frontbase jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb ).each do |adapter| %w( mysql mysql2 postgresql sqlite3 sqlite3_mem firebird db2 oracle sybase openbase frontbase jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb ).each do |adapter|
Rake::TestTask.new("test_#{adapter}") { |t| Rake::TestTask.new("test_#{adapter}") { |t|
adapter_short = adapter == 'db2' ? adapter : adapter[/^[a-z0-9]+/] adapter_short = adapter == 'db2' ? adapter : adapter[/^[a-z0-9]+/]