Project file changes causing `SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'` I switched over to use project file settings and now I occasionally get a constraint violation when trying to run the craft projectconfig/sync command. 

I think this is a bug, because the 

UPDATE `info` SET `id`=1, `version`='3.3.0.1', `schemaVersion`='3.3.3', `maintenance`=0, `config`=' ...` 


statement seem to be missing a WHERE, which means it tries to set ALL rows in table info to the same values. For some reason, I end up having 2 rows in info where the one with id=2 is basically empty. 

This is on version 3.3.0.1. 

Invoking a DELETE FROM info WHERE id = 2; resolves the situation in my case, but it is a bit cumbersome that this happens.
As far as I know the craft_info table should only have one row.

This would mean that either:


You have something installed / configured wrongly somewhere causing it to insert a 2nd row into the table
Or it's actually a craft bug, I'd advise you to search through The CraftCMS Github Issues and check if there's any issue resembling yours, if not create an issue there so it gets solved in the next few updates.