This is the first database I set up so I apologize if my problem is something obvious.
I'm playing around with my table design and tried to create some link tables with FKs to avoid redundant data. When I try to sync my EER model with the DB I get an error which makes no sense to me.
Executing SQL script in server ERROR: Error 1005: Can't create table 'jonijz1_Test.#sql-d7d_1291db' (errno: 150) ALTER TABLE `jonijz1_Test`.`UserGroupLink` ADD CONSTRAINT `fk_UserGroupLink_UserGroup` FOREIGN KEY (`UserGroupID`) REFERENCES `jonijz1_Test`.`UserGroup` (`UserGroupID`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_UserGroupLink_Users1` FOREIGN KEY (`UserID`) REFERENCES `jonijz1_Test`.`Users` (`UserID`) ON DELETE NO ACTION ON UPDATE NO ACTION SQL script execution finished: statements: 5 succeeded, 1 failed Fetching back view definitions in final form. Nothing to fetch
What am I doing wrong? And on a sidenote: would a design like this make any sense or am I approaching this wrong as well?