Problem:
DB restore fails with these messages:
# foreman-rake db:import_dump file=/shared_fs/foreman-dump/foreman.sql
Your backup is going to be imported from: /shared_fs/foreman-dump/foreman.sql
You can backup the old database 'foreman' by running:
- foreman-rake db:dump destination=/mydir/dumps/foreman.sql RAILS_ENV=production
This task will destroy your old database tables! Are you sure you want to continue? [y/N]
y
ERROR 1005 (HY000) at line 1893: Can't create table 'foreman.dynflow_actions' (errno: 150)
Completed.
Expected outcome:
No errors.
Foreman and Proxy versions:
1.14.3 (yes, I know, it is old, but still should work)
Foreman and Proxy plugin versions:
Other relevant data:
Sequence of commands:
# mysql -u root -p$DB_PASS -e "drop database foreman"
# mysql -u root -p$DB_PASS -e "show databases;"
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
# mysql -u root -p$DB_PASS -e "create database foreman"
and then import task that fails after a while…
Am I missing something in this sequence?
Quick Google search points out that this error is related to FK constrains, so how do I go about it?
Thanks!