Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #9198 - migration sets type explicitly #2134

Closed
wants to merge 1 commit into from

Conversation

ares
Copy link
Member

@ares ares commented Feb 6, 2015

This fixes existing migration. There's no way to safely fix from new migration (see below) so we should merge this ASAP. For users with already broken DB, this snippet executed from foreman console will help

Nic::Base.where(:type => nil).all.each {|n| n.type = 'Nic::Managed'; n.save!}

I would rather avoid adding new migration changing all Nics with unspecified type to Nic::Managed because we have no idea where they come from. Comments to this welcome.

@ohadlevy
Copy link
Member

ohadlevy commented Feb 8, 2015

:+1 would you consider adding rake tasks to fix it? or at least some way to detect it actively (vs. let the users search for the missing/corrupted interfaces ?

@ohadlevy
Copy link
Member

ohadlevy commented Feb 8, 2015

merged as b328d4c thanks @ares

@ohadlevy ohadlevy closed this Feb 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants