title: How to insert row with an auto increment column SQLite
body: <p>I downloded a MySQL database and parse it to SQLite using this PHP <a href="https://gist.github.com/esperlu/943776" rel="nofollow">script</a>. </p>
  
  <p>I use the SQLite database on WPF and i am able to make some operations using this <a href="http://www.janaks.com.np/using-sqlite-in-wpf-application/" rel="nofollow">library</a>. The problem is that i tried to execute an INSERT in a table with an auto increment field and it is not working, here is my query:</p>
  
  <pre><code>SQLiteConnection conn = new SQLiteConnection("Data Source=test.db");
  conn.Open();
  var command = conn.CreateCommand();
  
  command.CommandText = "INSERT INTO tickets(created, user) values ('2015-12-12', 345)";
  command.ExecuteNonQuery();
  conn.Close();
  </code></pre>
  
  <p>Here is my table <em>tickets</em> at the .db:</p>
  
  <pre><code>CREATE TABLE "tickets" (
    "id" int(11) NOT NULL ,
    "user" int(11) NOT NULL,
    "created" timestamp NOT NULL ,
    PRIMARY KEY ("id")
  )
  </code></pre>
  
  <p>At MySQL my query works perfect and my <em>id</em> column always get the next auto increment value, but in SQLite i can't get this value to autoincrement. When i run the app it crashes with the next message:</p>
  
  <blockquote>
    <p>Additional information: constraint failed</p>
    
    <p>NOT NULL constraint failed: tickets.id</p>
  </blockquote>
  
  <p>I know the value should not be null, but it should be auto incrementing... is this possible?</p>