Issue #1959 has been reported by grim_radical.

----------------------------------------
Bug #1959: 0.24.7 rails migration isn't idempotent
http://projects.reductivelabs.com:80/issues/1959

Author: grim_radical
Status: Unreviewed
Priority: Normal
Assigned to: 
Category: 
Target version: 
Complexity: Easy
Affected version: 0.24.7
Keywords: 


In rails/database/003_add_environment_to_host.rb, the call to add_column isn't 
guarded by any sort of check to see if that column already exists or not.

I got into a situation where the rails migration of my database only took us to 
schema version 2, but the "environment column" was already created in the 
database. dbmigrate was causing puppet to attempt to add that column (to take 
the schema to version 3), but it would continuously fail because the column 
already existed.

A simple fix is to put a guard around the calls to add_column (similar to what 
is done in the other db migration scripts). Patch is attached.


----------------------------------------
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to