Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Foreign Keys not being created

forums forums SQLyog Using SQLyog Foreign Keys not being created

  • This topic is empty.
Viewing 5 reply threads
  • Author
    Posts
    • #8588

      I have a mySQL (4.1) database with InnoDB tables. I wish to establish FK relationships between the tables and am using sqlyog v3.71.

      When I go into Manage Relationships, I enter the source and target columns and click CREATE. Nothing happens and no FK is created

      any ideas?

      Regards

      Richard

    • #16328
      Shadow
      Member

      SQLyog should display a message box in case of failing to create the FK. Did you check those possible reasons?

    • #16329

      I have now checked and found the foreign key is created – however it is not shown when using the manage relationships form as advised in documentation- details below. Is this a bug?

      Regards

      Richard

      Column Information For – transact_mysql.unspsc


      Field Type Collation Null Key Default Extra Privileges Comment










      code int(10) NULL PRI 0 select,insert,update,references

      name varchar(255) latin1_swedish_ci YES (NULL) select,insert,update,references

      version int(10) NULL YES MUL (NULL) select,insert,update,references

      Index Information For – transact_mysql.unspsc


      Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment













      unspsc 0 PRIMARY 1 code A 14239 (NULL) (NULL) BTREE

      unspsc 1 version 1 version A 5 (NULL) (NULL) YES BTREE

      DDL Information For – transact_mysql.unspsc


      Table Create Table



      unspsc CREATE TABLE `unspsc` (

      `code` int(10) NOT NULL default '0',

      `name` varchar(255) default NULL,

      `version` int(10) default NULL,

      PRIMARY KEY (`code`),

      KEY `version` (`version`),

      CONSTRAINT `unspsc_ibfk_1` FOREIGN KEY (`version`) REFERENCES `unspsc_version` (`ver_id`) ON DELETE CASCADE ON UPDATE CASCADE,

      ) ENGINE=InnoDB DEFAULT CHARSET=latin1

    • #16330
      Ritesh
      Member

      This is a known bug and has been fixed in SQLyog 4.0 BETA 1. SQLyog 4.0 BETA 2 is on the way.

      More information on SQLyog 4.0 BETA can be found at http://www.webyog.com/forums/index.php?act…ct=ST&f=2&t=977

    • #16331
      Shadow
      Member

      Yes, it's a known bug.

      Now I see that Ritesh was faster…

    • #16332

      thanks for your quick replies – I'll download the new version

      Regards

      Richard

Viewing 5 reply threads
  • You must be logged in to reply to this topic.