On Fri, Aug 19, 2011 at 03:46:45PM -0400, Scott Seago wrote:
src/app/controllers/providers_controller.rb | 6 +++--- src/app/models/provider_account.rb | 2 +- src/app/models/provider_account_observer.rb | 2 +- src/app/models/provider_type.rb | 4 ++-- src/app/views/provider_accounts/_list.xml.haml | 2 +- .../provider_accounts/_provider_selection.haml | 2 +- src/app/views/provider_types/_list.xml.haml | 2 +- src/app/views/providers/_list.xml.haml | 2 +- ...20110804215000_rename_provider_type_codename.rb | 9 +++++++++ src/db/seeds.rb | 20 ++++++++++---------- src/features/provider_type.feature | 18 +++++++++--------- .../step_definitions/provider_type_steps.rb | 6 +++--- src/spec/factories/credential.rb | 14 +++++++------- src/spec/factories/provider.rb | 6 +++--- src/spec/factories/provider_type.rb | 6 +++--- src/spec/models/provider_spec.rb | 2 +- 16 files changed, 56 insertions(+), 47 deletions(-) create mode 100644 src/db/migrate/20110804215000_rename_provider_type_codename.rb
I happened to test this on a fresh system where I hadn't yet run dc:setup in the development environment.
In that scenario (which will be the case for new users), db:migrate fails with this:
== AddProviderTypeIdToProvider: migrating ==================================== rake aborted! An error has occurred, this and all later migrations canceled:
undefined method `deltacloud_driver' for #ProviderType:0x7f1ab5e70be0
I've worked around this for now by doing dc:setup from an older checkout and then running migrations, but this will need fixing before we can push it. I'm not sure the best way solve this problem, though -- I think what's happening is that the validations require deltacloud_driver be present, but the column doesn't yet exist. Maybe you can bypass validation at this point in the migration?
-- Matt