sarsenbaev
Ah, to me it appears you have a database issue where it’s auto-indexing with previous IDs in some tables instead of auto-indexing with new IDs. There are many old threads on this subject. Essentially from those older threads it seemed like older versions of MySQL would lose the auto-index position after restart, server crash, etc. The best course of action is to upgrade to MySQL 8.0 (as MySQL started saving this on disk instead of in-memory) and either manually update the indexes to start at the last ID you have in each respective table or you can try to export/re-import the database to see if it fixes the issue itself.
Cheers.