title: Error SQLiteException: foreign key mismatch
body: <p>I want to insert a register into a table, with the following structure:</p>
  
  <pre><code>db=this.openOrCreateDatabase("calificaciones.db", MODE_PRIVATE, null);
  db.execSQL("PRAGMA foreign_keys=ON");
  db.execSQL("create table if not exists usuarios (idusuario integer primary key autoincrement, nusuario text, contrasena text, correo text);");
  db.execSQL("create table if not exists alumnos (idalumno integer primary key, apellidos text, nalumno text, especialidad text, grado text, grupo text);");
  db.execSQL("create table if not exists materias (idmateria integer primary key, nmateria text,"+" docente text, horas integer);");
  db.execSQL("create table if not exists calificacion (idcalif integer primary key autoincrement, idalumno integer, idmateria integer, idusuario integer, calificacion integer, parcial integer, foreign key(idalumno) references alumnos(idalumno), foreign key(idmateria) references materias(idmateria), foreign key(idusuario) references alumnos(idusuario));");
  </code></pre>
  
  <p>But, at the moment of inserting a register into the table "Calificacion", it gives me the following error message:</p>
  
  <p><code>android.database.sqlite.SQLiteException: foreign key mismatch - "calificacion" referencing "alumnos" (code 1): , while compiling: insert into calificacion (idalumno, idmateria, idusuario, calificacion, parcial) values (15330050790409,42069,1,10,3);</code></p>
  
  <p>It happens even if the registers of the other tables match with the data that I tried to insert into "Calificaciones". I tried to reproduce the same error on SQL Fiddle, using exactly the same Query's, but in that platform somehow it didn't cause any error.</p>
  
  <p>What is wrong with my syntax?</p>