Why do I get this weird error when trying to synchronise my model with the mysql database (v5.7.19, workbench v6.3.9)? As you can see from the screenshot, table1_createdOn
doesn't even have a default valid, and if i run the generated command with sql query it works:
CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET utf8 ;
CREATE TABLE IF NOT EXISTS `mydb`.`table1` (
`createdOn` TIMESTAMP NOT NULL,
PRIMARY KEY (`createdOn`))
CREATE TABLE IF NOT EXISTS `mydb`.`table2` (
`createdAt` TIMESTAMP NOT NULL,
`table1_createdOn` TIMESTAMP NOT NULL,
PRIMARY KEY (`table1_createdOn`),
CONSTRAINT `fk_round_table1`
FOREIGN KEY (`table1_createdOn`)
REFERENCES `mydb`.`table1` (`createdOn`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)