db:migrate from 1.17 to 1.19 fails if table table_preferences already exists.
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.
#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.