Related tag is not found or not primary or candidate (Error 1882)
A database relation object is being created or referenced in which some of the related information was missing, not primary or candidate, or invalid.
You used the REFERENCES and TAG clauses of the CREATE TABLE or ALTER TABLE command.
Make sure both tables involved in the relation are in the database.