title: Foreign key misatch referencing
body: <p>i need your help please,
  I'm creating a to-do app with flutter using moor as database,i've created three tables in my db,but only two are concerned by my problem they are <strong><em>tasks</em></strong> and <strong><em>projects</em></strong>.Then when i try to insert a new task i got this error </p>
  
  <blockquote>
    <p>Exception has occurred. 
    SqliteException (SqliteException: foreign key mismatch - "tasks" referencing "projects", SQL logic error)</p>
  </blockquote>
  
  <p>There is my project table</p>
  
  <pre><code>class Projects extends Table {
       IntColumn get id =&gt; integer().autoIncrement()();
       IntColumn get tasksNumber =&gt; integer()();
       TextColumn get projectName =&gt; text().withLength(min: 2, max: 32)();
       TextColumn get description =&gt; text().withLength(min: 2, max: 35)();
       DateTimeColumn get dateAndTime =&gt;dateTime().withDefault(Constant(DateTime.now()))();
       BoolColumn get isCompleted =&gt; boolean().withDefault(Constant(false))();
       @override
       Set&lt;Column&gt; get primaryKey =&gt; {id, projectName};
  }
  </code></pre>
  
  <p>And the task one is </p>
  
  <pre><code>class Tasks extends Table {
       IntColumn get id =&gt; integer().autoIncrement()();
       TextColumn get project =&gt;text().customConstraint('REFERENCES projects(projectName)')();
       TextColumn get taskName =&gt; text().withLength(min: 2, max: 32)();
       DateTimeColumn get dateAndTime =&gt;dateTime().withDefault(Constant(DateTime.now()))();
       BoolColumn get isDone =&gt; boolean().withDefault(Constant(false))();
       @override
       Set&lt;Column&gt; get primaryKey =&gt; {id, taskName, project};
  }
  </code></pre>
  
  <p>Thanks for your help </p>