Matthew Wright
2007-Mar-21 13:18 UTC
[Cruisecontrolrb-users] question on db:test:purge behavior
I saw cc.rb yesterday and gave it a try, what a nice project. Having setup 2 large cc (java) projects before, I have to say this is much easier to setup and has a great interface. Great job. In order to get my builds to work, I had to override the default cc behavior and remove the db:test:purge from the build. If I run the following in my project/work directory, the build succeeds: export RAILS_ENV=test rake db:test:purge && rake db:migrate && rake test If I run it via cc, I get this: /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.2/ lib/rake/rake_test_loader.rb" Mysql::Error: Table ''plan_days'' already exists: CREATE TABLE plan_days (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `plan_id` int(11) DEFAULT NULL, `day` int (11) DEFAULT NULL) ENGINE=InnoDB etc., etc. This is a table created in the 9th migration, so if the migrations were running twice because schema_info wasn''t being updated, I would expect more errors than this one. I thought maybe a foreign key was preventing a migration from dropping a table or something, but I added drops in all the down methods of my migrations where fks are created. Just wondering if anyone else has seen this. . Matt
Alexey Verkhovsky
2007-Mar-21 20:13 UTC
[Cruisecontrolrb-users] question on db:test:purge behavior
If you want to get to the bottom of it, try to run the builder with --trace option, like this: cruise build YourProject --trace and force the build. You will get a stack trace out of Rake that will tell you what task is being executed. Otherwise, as the documentation says "if defaults do not work for you, instead of trying to bend your app into working with CC.rb defaults, just create a custom ''cruise'' task in your build and be done with it". Alex Matthew Wright <matt at wrighters.net> Sent by: cruisecontrolrb-users-bounces at rubyforge.org 03/21/2007 07:18 AM To cruisecontrolrb-users at rubyforge.org cc Subject [Cruisecontrolrb-users] question on db:test:purge behavior I saw cc.rb yesterday and gave it a try, what a nice project. Having setup 2 large cc (java) projects before, I have to say this is much easier to setup and has a great interface. Great job. In order to get my builds to work, I had to override the default cc behavior and remove the db:test:purge from the build. If I run the following in my project/work directory, the build succeeds: export RAILS_ENV=test rake db:test:purge && rake db:migrate && rake test If I run it via cc, I get this: /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.2/ lib/rake/rake_test_loader.rb" Mysql::Error: Table ''plan_days'' already exists: CREATE TABLE plan_days (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `plan_id` int(11) DEFAULT NULL, `day` int (11) DEFAULT NULL) ENGINE=InnoDB etc., etc. This is a table created in the 9th migration, so if the migrations were running twice because schema_info wasn''t being updated, I would expect more errors than this one. I thought maybe a foreign key was preventing a migration from dropping a table or something, but I added drops in all the down methods of my migrations where fks are created. Just wondering if anyone else has seen this. . Matt _______________________________________________ Cruisecontrolrb-users mailing list Cruisecontrolrb-users at rubyforge.org http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070321/d82b3a5e/attachment-0001.html