CiviCRM_API3_Exception: "DB Error: constraint violation"
I share my solution for the problem. First of all, I did this because of a partially loaded database problem. I was getting this error when I did any CiviCRM version upgrade.

When I checked the database, the information in the "civicrm_domain" table was displayed as "5.14.alpha1.upgrade". However, because the site was an FTP update CiviCRM version 5.19.1 was.

First of all, I set up a backup of a time before 5.14 with a different subdomain. Then I upgraded the Joomla and CiviCRM version of this backup to the version I had problems, ie 5.14.1.

Then I deleted everything in the database, including Joomla tables. I have thrown the SQL files with the actual site data into the SQL files of the new subdomain. In the "civicrm_domain" table, I manually changed the version information to "5.14.1".

After that I started the update with the URL of CiviCRM 5.15.0 in Joomla Plugin Update and this time I didn't get "partially loaded database" error and the whole update was successful.

The only problem is that any update, installation and uninstallation of the CiviCRM plug-ins is displayed. I have raised a question for this error. You can also follow it if you want. Of course, that problem will be corrected.