Answers.Body: <p>As far as I know the <code>craft_info</code> table should only have one row.</p>
  
  <p>This would mean that either:</p>
  
  <ol>
  <li><p>You have something installed / configured wrongly somewhere causing it to insert a 2nd row into the table</p></li>
  <li><p>Or it's actually a craft bug, I'd advise you to search through <a href="https://github.com/craftcms/cms/issues" rel="nofollow noreferrer">The CraftCMS Github Issues</a> and check if there's any issue resembling yours, if not create an issue there so it gets solved in the next few updates.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-05T09:48:05.110Z
Answers.LastActivityDate: 2019-09-05T09:48:05.110Z
Answers.UserDisplayName: Campiotti
Body: <p>I switched over to use project file settings and now I occasionally get a constraint violation when trying to run the <code>craft projectconfig/sync</code> command. </p>
  
  <p>I think this is a bug, because the </p>
  
  <pre><code>UPDATE `info` SET `id`=1, `version`='3.3.0.1', `schemaVersion`='3.3.3', `maintenance`=0, `config`=' ...` 
  </code></pre>
  
  <p>statement seem to be missing a WHERE, which means it tries to set ALL rows in table <code>info</code> to the same values. For some reason, I end up having 2 rows in <code>info</code> where the one with id=2 is basically empty. </p>
  
  <p>This is on version 3.3.0.1. </p>
  
  <p>Invoking a <code>DELETE FROM info WHERE id = 2;</code> resolves the situation in my case, but it is a bit cumbersome that this happens.</p>
  
Tags: <bug><projectconfig>
Title: Project file changes causing `SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'`
ThreadText: # Project file changes causing `SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'`
  
  (Asked by: username_0 on 2019-09-03)
  
  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.
  
  **Tags:** bug, projectconfig
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-09-05. Score: 1
  
  As far as I know the `craft_info` table should only have one row.
  
  This would mean that either:
  
  1. You have something installed / configured wrongly somewhere causing it to insert a 2nd row into the table
  2. Or it's actually a craft bug, I'd advise you to search through [The CraftCMS Github Issues](https://github.com/craftcms/cms/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.
  
  
  ---
  
  