forums › forums › SQLyog › Using SQLyog › creating relationship problem
- This topic is empty.
-
AuthorPosts
-
-
March 2, 2005 at 7:51 pm #17113
CalEvans
MemberIMHO,
(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=
-
March 2, 2005 at 9:52 pm #17114
phaelium
MemberOk, 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 🙂
-
March 3, 2005 at 3:29 am #17115
Ritesh
MemberWhile 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;
-
-
AuthorPosts
- You must be logged in to reply to this topic.