New FK not created with name

Compares and synchronizes MySQL database schemas.

Moderators: Chris Auckland, eddie davis, Michael Christofides

New FK not created with name

Postby bmoore86 » Fri Dec 20, 2013 9:40 pm

Have an issue where source has FK but target does not.
Am getting a working ALTER TABLE statement, but the ALTER does not include the FK name, which means I get whatever MySQL wants to generate for me.

Don't really like this. Would prefer that the newly created FK have the same name as my Source.

Is there any way to do this??

Here's what MySQL Compare gives me:
ALTER TABLE `acquisition` ADD FOREIGN KEY (`character_id`) REFERENCES `player_character` (`character_id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

What I would prefer:
ALTER TABLE `acquisition` ADD CONSTRAINT `fk_player_character_to_acquisition` FOREIGN KEY (`character_id`) REFERENCES `player_character` (`character_id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

Thanks!
bmoore86
 
Posts: 1
Joined: Fri Dec 20, 2013 9:15 pm
Location: United States

Postby eddie davis » Mon Dec 23, 2013 3:27 pm

Hi
Thank you for your forum post.

I suspect that MySQL Compare has read the information from the metadata within a system file and created the ALTER TABLE statement in the format you do not like.

I have submitted a Bug Report for the Development Ream to consider, the Bug Report reference is MSC-67. Also a Support Ticket has been created for you HERE, call reference #10162.

I will update this post when I receive further information.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 942
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software


Return to MySQL Compare

Who is online

Users browsing this forum: No registered users and 0 guests