Red Gate forums :: View topic - New FK not created with name
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
MySQL Compare
MySQL Compare forum

New FK not created with name

Search in MySQL Compare forum
Post new topic   Reply to topic
Jump to:  
Author Message
bmoore86



Joined: 20 Dec 2013
Posts: 1
Location: United States

PostPosted: Fri Dec 20, 2013 9:40 pm    Post subject: New FK not created with name Reply with quote

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!
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 937
Location: Red Gate Software

PostPosted: Mon Dec 23, 2013 3:27 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group