title: Missing index for constraint
body: <p>Getting this error - "Failed to add the foreign key constraint. Missing index for constraint 'FK_transcriptionServiceName' in the referenced table 'transcriptionservices' "</p>
  
  <p>I have searched google to no avail. Any ideas?</p>
  
  <p>Here's the SQL:</p>
  
  <pre><code>CREATE TABLE transcriptionConfig (
    id BIGINT,
    transcriptionEnabled BOOLEAN,
    PRIMARY KEY(id),
    CONSTRAINT `FKUSER` FOREIGN KEY (id) REFERENCES users(id) ON DELETE CASCADE
  ) ENGINE=ndb;
  
  
  CREATE TABLE transcriptionServices (
    id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(80) NOT NULL,
    URL VARCHAR(80) NOT NULL
  ) ENGINE=ndb AUTO_INCREMENT=0;
  
  
  ALTER TABLE transcriptionConfig
    ADD `serviceName` VARCHAR(80) NOT NULL;
  
  
  ALTER TABLE transcriptionConfig
    ADD CONSTRAINT FK_transcriptionServiceName
    FOREIGN KEY (serviceName) REFERENCES transcriptionServices(name)
    ON DELETE CASCADE;
  </code></pre>