title: SQLite - NOT NULL constraint failed
body: <p>I am trying to create a simple SQLite database that will allow me to store email addresses and timestamps.  I have created the table like this:</p>
  
  <pre><code>$sql =&lt;&lt;&lt;EOF
          CREATE TABLE ENTRIES
          (ID INT PRIMARY KEY      NOT NULL,
          EMAIL           EMAIL    NOT NULL,
          TIMESTAMP DATETIME DEFAULT CURRENT_TIMESTAMP);
  EOF;
  </code></pre>
  
  <p>And I am trying to insert an email like this:</p>
  
  <pre><code>$sql =&lt;&lt;&lt;EOF
        INSERT INTO ENTRIES (EMAIL)
        VALUES (test@test.com);
  EOF;
  </code></pre>
  
  <p>I am getting an error</p>
  
  <blockquote>
  <pre><code>NOT NULL constraint failed: ENTRIES.ID
  </code></pre>
  </blockquote>
  
  <p>I am assuming this is to do with the ID and autoincrement?  I have read the docs and it advises against using autoincrement. Where am I going wrong?</p>