Project

General

Profile

Bug #25052

db:migrate from 1.17 to 1.19 fails if table table_preferences already exists.

Added by Martin Hovmöller about 4 years ago. Updated about 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

I have a foreman setup running 1.19 where I imported a database from a machine running foreman 1.17.
After importing the database I ran /usr/sbin/foreman-rake db:migrate to update the database to 1.19, this failed with the error "Mysql2::Error: Table 'table_preferences' already exists".

Since table_preferences was empty I dropped the table and re-ran the migration, this time without issues.
The migrate script should not fail if the table is already present.

History

#1 Updated by Tomer Brisker about 3 years ago

  • Status changed from New to Rejected

Support for MySQL is being dropped in Foreman 2.0. Please migrate to PostgreSQL - see https://theforeman.org/2019/09/dropping-support-for-mysql.html for more details.

Also available in: Atom PDF