title: Flutter sqflite error SqfliteDatabaseException
body: <p>I have a flutter application with a sqflite database, when i save a new record it saves normal but when i change and save it breaks and shows this error:</p>
  
  <p><img src="https://i.stack.imgur.com/fKKBv.png" alt="enter image description here"></p>
  
  <pre><code>await db.execute("
        CREATE TABLE $registroTable(
        $idColumn INTEGER PRIMARY KEY AUTOINCREMENT,
        $viagemColumn INTEGER,
        $categoriaColumn INTEGER,
        $dateColumn DATE,
        $tituloColumn TEXT,
        $valorColumn FLOAT,
        FOREIGN KEY ($viagemColumn) REFERENCES $viagemTable($idColumn),
        FOREIGN KEY ($categoriaColumn) REFERENCES $categoriaTable($idColumn)
        );");
      });
  </code></pre>
  
  <p>The exception has occurred:</p>
  
  <blockquote>
  <pre><code>SqfliteDatabaseException (DatabaseException(Error Domain=FMDatabase
  Code=19 "UNIQUE constraint failed: registroTable.idColumn"
  UserInfo={NSLocalizedDescription=UNIQUE constraint failed:
  registroTable.idColumn}) sql 'INSERT INTO registroTable (viagemColumn,
  categoriaColumn, dateColumn, tituloColumn, valorColumn, idColumn)
  VALUES (?, ?, ?, ?, ?, ?)' args [1, 1, 2019-10-27, milho, 15000.0,
  1]})
  </code></pre>
  </blockquote>