drbowen wrote on Thursday, November 22, 2012:
I am currently dumping my datababase to restore to a second test instance of OpenEMR. During the restore:
mysql -u root -p bpuc_testing < openemr.sql
I get the following error:
ERROR 1005 (HY000) at line 251: Can’t create table ‘bpuc_testing.automatic_notification’ (errno: 121)
References to this error code state that this means there is no primary index on the table being created.
Looking at the table ‘automatic_notification’ there appears to a primary key on notification_id.
Keyname: PRIMARY
Type: PRIMARY
Cardinality: 2
Field: notification_id
I have repeated this and get the same error.
Additional possible solutions are to log in to mysql cli and run:
SHOW ENGINE INNODB STATUS\G
looking for:
LATEST FOREIGN KEY ERROR
There are no foreign key erros listed.
Not sure what is causing this error. Are there any ideas?
Sam Bowen, MD
OEMR, executive director