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

creating relationship problem

forums forums SQLyog Using SQLyog creating relationship problem

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #17113
      CalEvans
      Member

      IMHO,

      (and take it for what it's worth)

      I've always found the relationship manger a weak link in SQLYog. Whenever I have to change things, I usually end up copying the tables over to test (create table test.yaddyadda select * from yaddayadda) dropping and recreating the tables with the relationships intact. Then reloading the data.

      Occasionally, I have to use

      set foreign_key_checks=0;

      before reloading the data but I try not to because the errors help me find problems.

      This methodology helps me separate syntax errors 9which usually bite me in the ass every time) with data issues.

      HTH,

      =C=

    • #17114
      phaelium
      Member

      Ok, so how do I take the sql code I have and change it to include the relationships I want?

      Then do I just run that code in MySQL?

      Thanks for your help 🙂

    • #17115
      Ritesh
      Member

      While exporting data using SQLyog, just check the option Set FOREIGN_KEY_CHECKS=0. It will generate the script like:

      Code:
      /*
      SQLyog v4.03
      Host – 207.184.100.230 : Database – vah service
      **************************************************************
      Server version 5.0.2-alpha
      */

      create database if not exists `vah service`;

      use `vah service`;

      set foreign_key_checks = 0;

      /*
      Table structure for Tech Names
      */

      drop table if exists `Tech Names`;
      CREATE TABLE `Tech Names` (
      `Tech Name` text NOT NULL,
      `Tech Number` smallint(6) NOT NULL,
      PRIMARY KEY (`Tech Number`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

      …………..
      …………..

      set foreign_key_checks = 1;

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