Skip to content

Commit

Permalink
fixed rake db:test:clone_structure task
Browse files Browse the repository at this point in the history
  • Loading branch information
Raimonds Simanovskis committed Oct 10, 2008
1 parent d864d04 commit e50d172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion History.txt
@@ -1,4 +1,4 @@
== 1.1.8 2008-09-??
== 1.1.8 2008-10-10

* Bug fixes:
* Fixed storing of serialized LOB columns
Expand All @@ -7,6 +7,8 @@
* Sequence creation for tables with non-default primary key in create_table block
* Do count distinct workaround only when composite_primary_keys gem is used
(otherwise count distinct did not work with ActiveRecord 2.1.1)
* Fixed rake db:test:clone_structure task
(see http://rsim.lighthouseapp.com/projects/11468/tickets/11-rake-dbtestclone_structure-fails-in-117)

== 1.1.7 2008-08-20

Expand Down
8 changes: 4 additions & 4 deletions lib/active_record/connection_adapters/oracle_enhanced.rake
Expand Up @@ -27,16 +27,16 @@ namespace :db do
redefine_task :clone_structure => [ "db:structure:dump", "db:test:purge" ] do
abcs = ActiveRecord::Base.configurations
ActiveRecord::Base.establish_connection(:test)
IO.readlines("db/#{RAILS_ENV}_structure.sql").join.split(";\n\n").each do |ddl|
ActiveRecord::Base.connection.execute(ddl)
IO.readlines("db/#{RAILS_ENV}_structure.sql").join.split("\n\n").each do |ddl|
ActiveRecord::Base.connection.execute(ddl.chop)
end
end

redefine_task :purge => :environment do
abcs = ActiveRecord::Base.configurations
ActiveRecord::Base.establish_connection(:test)
ActiveRecord::Base.connection.structure_drop.split(";\n\n").each do |ddl|
ActiveRecord::Base.connection.execute(ddl)
ActiveRecord::Base.connection.structure_drop.split("\n\n").each do |ddl|
ActiveRecord::Base.connection.execute(ddl.chop)
end
end

Expand Down

0 comments on commit e50d172

Please sign in to comment.