Currently in my CI I'm completely wiping production db with development db. That was fine for testing but I'm coming to a stage where I need to start merging instead of completely wiping.
Right now the command I'm using to wipe and write is as follows:
mysqldump -u "$DB_USERNAME" -p"$DB_PASSWORD" -h "$DB_HOST" "development" > dump.sql
mysql -u "$DB_USERNAME" -p"$DB_PASSWORD" -h "$DB_HOST" "production" < dump.sql
I tried the following for merging:
mysqldump --no-create-db --no-create-info -u "$DB_USERNAME" -p"$DB_PASSWORD" -h "$DB_HOST" "development" > dump.sql
Which I thought would do the trick but I get the following error:
ERROR 1062 (23000) at line 23: Duplicate entry '1' for key 'PRIMARY'
Any ideas where I'm falling short?
of