title: Is it allowed to have null foreign key in sqlite when PRAGMA foreign_keys=ON?
body: <p>according to <a href="http://www.sqlite.org/foreignkeys.html#fk_basics" rel="nofollow noreferrer">this</a> null foreign keys are allowed unless and until we are adding the appropriate "NOT NULL" constraint to the schema.</p>
  
  <p>but I am seeing the some different behavior,</p>
  
  <pre><code>sqlite&gt; PRAGMA Foreign_keys;
  1
  sqlite&gt; create table proc (
  sqlite&gt;   pid integer,
  sqlite&gt;   name text,
  sqlite&gt;   ppid integer,
  sqlite&gt;   foreign key (ppid) references proc (id)
  sqlite&gt; );
  sqlite&gt; .schema proc
  CREATE TABLE proc (
    pid integer,
    name text,
    ppid integer,
    foreign key (ppid) references proc (id)
  );
  
  sqlite&gt; insert into proc (pid, name, ppid)
  sqlite&gt; values (0, "init", null);
  Error: foreign key mismatch
  
  sqlite&gt; PRAGMA Foreign_keys=OFF;
  sqlite&gt; PRAGMA Foreign_keys;
  0
  
  sqlite&gt; insert into proc (pid, name, ppid)
  sqlite&gt; values (0, "init", null);
  sqlite&gt; select * from proc;
  0|init|
  </code></pre>
  
  <p>how can I allow null foreign key in sqlite when PRAGMA foreign_keys=ON? or it is not possible at all? </p>