0

For this issue it only happens on the GUI side, Script still works fine
Have been looking for answers and the closest i found is
Mysql Workbench Can't Select Foreign Key
but it doesn't really answer the question considering in the create statement both keys are of the same datatypes

there are bug reports on this issue in 2010 on mysql side without any followup and doesn't seem like a lot of people have complained about it so was wondering if i did something wrong

It use to work well before i changed the coalition to utf8mb4_unicode_ci
I used a script to set all varchar and text to become ut8mb4 previously
I'm fine with just using scripts for now but the change to utf8mb4 sort of affected data import as well which is why I am trying to figure out of if its my fault.

mysql version 5.7.22 (on AWS RDS)
workbench version 8.0.22

CREATE TABLE `campaign` (
  `campaignID` int(11) NOT NULL,
  `productID` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
  `createdDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `startDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `endDate` datetime DEFAULT NULL,
  PRIMARY KEY (`campaignID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `products` (
  `productID` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
  `productName` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'namelessProduct',
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`productID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Solly
  • 41
  • 5
  • There are no foreign keys in your create statements – nacho Nov 27 '20 at 08:09
  • Yes thats why I'm asking on the GUI side. For now certain tables are really just created and edited on the go so on GUI its easier to link foreign constraints since its just ticking and removing is the same and GUI will generate the codes. – Solly Nov 27 '20 at 09:25

0 Answers0