tasks/databases/mysql.rake in composite_primary_keys-5.0.4 vs tasks/databases/mysql.rake in composite_primary_keys-5.0.5
- old
+ new
@@ -17,11 +17,13 @@
path = File.join(PROJECT_ROOT, 'test', 'fixtures', 'db_definitions', 'mysql.sql')
sql = File.open(path, 'rb') do |file|
file.read
end
+ Rake::Task['mysql:load_connection'].reenable
Rake::Task['mysql:load_connection'].invoke
+ #puts %(ActiveRecord::Base.connection.instance_variable_get(:@config)=#{(ActiveRecord::Base.connection.instance_variable_get(:@config)).inspect})
ActiveRecord::Base.connection.execute(sql)
end
desc 'Drop the MySQL test databases'
task :drop_databases => :load_connection do
@@ -31,7 +33,8 @@
desc 'Rebuild the MySQL test databases'
task :rebuild_databases => [:drop_databases, :build_databases]
task :load_connection do
require File.join(PROJECT_ROOT, "test", "connections", "native_mysql", "connection")
+ establish_connection
end
-end
\ No newline at end of file
+end