title: How to temporarily break column uniqueness in SQLite?
body: <p>I've got a simple table:</p>
  
  <pre><code>CREATE TABLE ChecklistStep (
      Checklist INTEGER REFERENCES Checklist (Id), 
      Id        INTEGER PRIMARY KEY AUTOINCREMENT, 
      StepIndex INTEGER NOT NULL, 
      Name      VARCHAR NOT NULL, 
      UNIQUE (Checklist, StepIndex));
  </code></pre>
  
  <p>Now I want to exchange two items' indexes. Doing so I'm breaking temporarily uniqueness of pair (Checklist, StepIndex). I hoped, that I can do that in transaction, such that after committing, all constraints will be kept, but this doesn't work:</p>
  
  <pre><code>begin transaction;
  update ChecklistStep set StepIndex = 0 where id = 6;
  update ChecklistStep set StepIndex = 1 where id = 5;
  commit transaction;
  </code></pre>
  
  <p>Causes:</p>
  
  <pre><code>UNIQUE constraint failed: ChecklistStep.Checklist, ChecklistStep.StepIndex
  </code></pre>
  
  <p>How to write such update?</p>