OJS Data Migration Duplicate Entry

I am in the process of migrating a journal on OJS_2.3.6 to OJS-2.4.7.1. I exported the database from the 2.3.6 journal.
When I try to import the database into the new MySQL location I am getting:
#1072 - Duplicate entry ‘88’ for key ‘article_gallerys_public_id’
When I look at the data for ‘article_gallerys’ i see that ‘gallery_id’ 116 and 91 both have ‘article_id’ with the same value of 88.

In table ‘issues’ I have #1062 - Duplicate entry ‘1’ for key ‘issues_public_issues_id’

How do I fix this to get the import working and finish the migration. This is rather urgent.

Thanks,
Edward

Hi @EdwardDavid,

This sounds like a MySQL admin problem rather than anything to do with OJS. I suspect you’re attempting to import your data into a database that already contains data. (I presume that article_gallerys_public_id is a typo of article_galley_public_id and gallery_id is a typo of galley_id?)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
It was my typo should be Galley not Gallery.
The database is empty no tables in it at all. I am taking the export from OJS-2.3.6 and importing to a new database for OJS-2.4.7.1.

So not sure why these two tables would have duplicate keys. That should never happen.

Thanks,
Edward

Hi @EdwardDavid,

When you say “exported the database”, are you talking about e.g. a phpMyAdmin import/export, or are you using the OJS XML import/export tools?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I was doing an MyDB Studio SQL export of the database.

When I look at the data for ‘article_gallerys’ i see that ‘gallery_id’ 116 and 91 both have ‘article_id’ with the same value of 88.
This is from the OJS-2.3.6 database.

Hope this helps.
Edward

Hi @EdwardDavid,

I haven’t used MyDB Studio, but I think the article_id column is not the problem here. It’s perfectly valid for two article_galley (not article_gallerys – typo?) entries to have the same article_id.

I’d suggest looking at the definition of the index from the original MySQL error message. But as OJS isn’t in the mix here for the tools you’re working with, you might be able to get some more specific guidance by posting on StackOverflow or similar.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Just in case anyone else out there is thinking of using MyDB Studio.
Don’t use it. The program messes up the Index keys, dropping keys that are needed and adds keys that should not be there.

Edward