kahodges Posted November 24, 2010 Share Posted November 24, 2010 I just started using Qcodo framework, and ran the codegen. It produced the following error regarding my mysql database: Notice: It is recommended that you add a single-column index on "am_startup.empl oyee" for the Foreign Key am_startup_ibfk_1 I'm not exactly sure what this means? Do I add another column to the table, and name it am_startup_ibfk_1? I already have that column , am_startup.employee indexed. I'm using phpMyAdmin to set up the relations between the tables. I'm just barely grasping foreign keys, so your help would be most appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/219695-foreign-keys-problem/ Share on other sites More sharing options...
jdavidbakr Posted November 24, 2010 Share Posted November 24, 2010 It looks like it's just asking you to create an index on am_startup.employee but if you already have it indexed then I'm not sure why it seems to think it's not. Might double-check to make sure that your index includes only that column, which is specifically what it's asking for. If it is correct then it may be a bug in the framework when it checks the database schema. Someone more familiar with Qcodo may have further insight. Quote Link to comment https://forums.phpfreaks.com/topic/219695-foreign-keys-problem/#findComment-1138965 Share on other sites More sharing options...
kahodges Posted November 24, 2010 Author Share Posted November 24, 2010 That's what it was. It was including more than the one column in the index. I dropped the relation, dropped the index. added the index back, added the relation back, and codegen. It's not giving the notice any longer. Thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/219695-foreign-keys-problem/#findComment-1138976 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.