Page 1 of 1

Synchronization Wizard MySQL statements produce error

Posted: Sat 28 Aug 2010 02:10
by vkimura
I’m trying to compare two databases using dbForge MySQL. I managed to sync two database schemas with dbForge which went well. So then then next step I tried to do was sync the data of two databases.

I have the snapshots of what I see on my blog here:
http://blog.tutorialref.com/mysql/mysql ... s-224.html

When I try and execute the MySQL statements produced by the Synchronization Wizard I receive an error. The error is that one or more of the columns does not have a default value. So this statement:

Code: Select all

INSERT INTO ratings(id, rating) VALUES (62, 2);
INSERT INTO ratings(id, rating) VALUES (61, 4);
INSERT INTO ratings(id, rating) VALUES (63, 3);
gives me the error. The workaround is to change the above to:

Code: Select all

INSERT INTO ratings(id, rating, div_id, ip) VALUES (62, 2, '', '');
INSERT INTO ratings (id, rating, div_id, ip) VALUES (61, 4, '', '');
INSERT INTO ratings (id, rating, div_id, ip) VALUES (63, 3, '', '');
But I think the Synchronization Wizard should do this automatically. Is this a bug in the pro version 3.60.379? Is this fixed in the latest version?

Much thanks,
Victor[/code]

Posted: Mon 30 Aug 2010 09:34
by Viktor
Thanks for your question. This is not a bug. This message appears because the `ip` and `div_id` columns are NOT NULL and don't have any default values. That's why MySql and dbForge didn't know the exact data you wanted to insert into this columns by default. Please specify default value ' ' and this error disappears.
div_id TEXT NOT NULL Default ' ',
ip TEXT NOT NULL Default ' ',