I'm setting up a reference in Fluent between two tables here. In Postgres, this sets up a FKC so that I can't create a post if the user doesn't exist, as defined in this test. However, on MySQL this isn't setting up any FKC and the test fails.
This is the SQL the migration produces:
2020-04-29T15:23:19+0100 debug: database-id=mysql CREATE TABLE `BlogPost`(`postID` BIGINT PRIMARY KEY AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `contents` VARCHAR(255) NOT NULL, `author` BIGINT NOT NULL REFERENCES `BlogUser` (`userID`) ON DELETE NO ACTION ON UPDATE NO ACTION, `created` DATETIME(6) NOT NULL, `lastEdited` DATETIME(6), `slugUrl` VARCHAR(255) NOT NULL, `published` BOOL NOT NULL, CONSTRAINT `d9fbf3c95bb905bc68d282cb6b0ac0415401fdc4` UNIQUE (`slugUrl`)) []
Yeah, I'm seeing that as well, but when looking at the database keys, it's not setting up any foreign keys when it should for MySQL at the same time - at least according to this post
I'm setting up a reference in Fluent between two tables here. In Postgres, this sets up a FKC so that I can't create a post if the user doesn't exist, as defined in this test. However, on MySQL this isn't setting up any FKC and the test fails.
This is the SQL the migration produces: