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 about 11 years ago. Updated about 8 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

Also available in: Atom PDF