I''m having a bit of trouble getting a rails project to build properly
within
cruisecontrolrb.
My cruise task is in lib/tasks/my_project.rake, and looks like this:
task :cruise => [''db:test:purge'',
''db:migrate'', ''db:test:prepare'',
''test:coverage:clean'',
''test:coverage:prepare'',
''test:coverage:run'',
''test:coverage:verify''] do
end
The issue is with the db:migrate call. If I go to
[cruise_dir]/projects/my_project/work/ and run rake cruise, it works fine.
It deletes the old db, migrates, and runs the tests. I''ve checked to
make
sure it''s re-runnable, and it works no matter how many times I do it in
a
row.
Within the cc rails app, however, I get a build failed message that one of
my migrations is broken. Specifically, it says there''s no index on
"people:login" My migrations are as follows:
002_add_people:
class CreatePeople < ActiveRecord::Migration
def self.up
create_table :people, :force => true do |t|
t.string :login
t.string :email
t.string :crypted_password, :limit => 40
t.string :salt, :limit => 40
t.timestamps
t.string :remember_token
t.datetime :remember_token_expires_at
t.string :openid_url
end
add_index :people, :login
add_index :people, :email
add_index :people, :openid_url
end
...
end
004_drop_login_name:
class DropLoginName < ActiveRecord::Migration
def self.up
remove_index :people, :login
remove_column :people, :login
end
def self.down
raise ActiveRecord::IrreversibleMigration.new("can''t recover
deleted
login names")
end
end
For some reason the cc app seems to be trying to run the migrations twice.
Any thoughts?
thanks in advance,
Gaius
--
View this message in context:
http://www.nabble.com/db%3Amigrate-problem-tp14370093p14370093.html
Sent from the CruiseControl.rb - Users mailing list archive at Nabble.com.