I put these commands to create the table;
CREATE TABLE pessoa (
codigo BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(80) NOT NULL,
codigo_condominio BIGINT(20) NOT NULL,
codigo_proprietario BIGINT(20) NOT NULL,
tipoPessoa VARCHAR(80) NOT NULL,
FOREIGN KEY (codigo_condominio) REFERENCES condominio (codigo),
FOREIGN KEY (codigo_proprietario) REFERENCES proprietario (codigo)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
but it's causing me this error
ERROR 1215 (HY000): Can not add foreign key constraint
What will be the problem?