We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are several errors in alter.sql that prevent users to succesfully install the database correctly.
The text was updated successfully, but these errors were encountered:
Tried to simplify the issue in the following example:
CREATE TABLE `test`.`table1` ( `id` INT NOT NULL AUTO_INCREMENT, `field1` VARCHAR(10) NOT NULL, `field2` VARCHAR(10) NULL, `field3` TIMESTAMP NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `table1_field1_uk` (`field1`), UNIQUE KEY `table1_field3_uk` (`field3`) ) ENGINE=InnoDB; CREATE TABLE `test`.`table2` ( `id` INT NOT NULL AUTO_INCREMENT, `field1` VARCHAR(10) NOT NULL, `field2` VARCHAR(10) NULL, `field3` TIMESTAMP NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `table2_field1_uk` (`field1`), UNIQUE KEY `table2_field3_uk` (`field3`) ) ENGINE=InnoDB; ALTER TABLE `test`.`table1` ADD CONSTRAINT `fk_table1_fields` FOREIGN KEY (`id`, `field1`, `field3`) REFERENCES `test`.`table2` (`id`, `field1`, `field3`) ON UPDATE CASCADE ON DELETE CASCADE;
This gives the following error code without any other information. It looks OK to me, but apparently I'm missing something important.
Error Code: 1215. Cannot add foreign key constraint
Sorry, something went wrong.
No branches or pull requests
There are several errors in alter.sql that prevent users to succesfully install the database correctly.
The text was updated successfully, but these errors were encountered: