Project

General

Profile

Actions

Bug #3576

closed

db:migrate fails when upgrading directly from 0.4.2 to 1.3.0

Added by Adam Heinz over 10 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I'm using the puppet-foreman module to upgrade an ancient foreman installation, but Exec["dbmigrate"] fails with:

The single-table inheritance mechanism failed to locate the subclass: 'Puppet'. This error is raised because the column 'category' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Setting.inheritance_column to use another column for that information.

gwmngilfen on #theforeman came up with a workaround:

Run the SQL from db/migrate/20130417110127_add_sti_to_settings.rb manually.

UPDATE settings set category='Setting::Auth' where category='Auth';
UPDATE settings set category='Setting::General' where category='General';
UPDATE settings set category='Setting::Puppet' where category='Puppet';
UPDATE settings set category='Setting::Provisioning' where category='Provisioning';

After that, foreman-rake db:migrate runs to completion.

Actions #1

Updated by Adam Heinz over 10 years ago

Test environment:
CentOS 6, MySQL 5.1, Puppet 2.7

If it would be useful, I have a 570KB dump of my combined puppet+foreman database that I could scrub sensitive information out of, then attach.

Actions #2

Updated by Marek Hulán over 7 years ago

  • Status changed from New to Resolved

I'm sorry we couldn't help with this but it seems you resolved it with Greg's help. I guess we can close this now. We support upgrading just by one version so in similar cases, I'd recommend updating to 1.0 -> 1.1 -> 1.2...

Actions

Also available in: Atom PDF