Use existing field as foreign key in the diagram view

Sergey Pashkov sergey_pashkov at valentina-db.com
Sun Mar 16 08:15:04 CDT 2014


Hello, Mike

1. Do you see foreign keys in other tools?
I've installed Wordpress and foreign keys are not defined at all.

2. Double-click a dotted link line to open an editor, on the left pane you
can select `comment_id` field to define it as a foreign key field.

--
Best regards,
Sergey Pashkov.


On Sun, Mar 16, 2014 at 11:08 AM, Pretzlaw <pretzlaw at googlemail.com> wrote:

>  Hello everyone,
>
> I like VStudio because it is much faster than the MySql Workbench with
> almost the same capabilities.
>
> Today I wanted to create a database diagram. Unfortunately VStudio doesn't
> seem to look up the existing foreign key, so I add relations by hand. Now I
> came up with something like this:
>
> The type of connection is shown 1:n and it's bound to the primary key but
> as I edit the script of this link:
>
> -- CREATE LINK "lnk_wp_comments_wp_commentmeta" ----------------
> ALTER TABLE `wp_commentmeta`
> ADD CONSTRAINT `lnk_wp_comments_wp_commentmeta`
>     FOREIGN KEY (  )
>     REFERENCES `wp_comments`( `comment_ID` )
>     ON DELETE Cascade
>     ON UPDATE Cascade;
> -- -------------------------------------------------------------
>
> the foreign key is missing.
>
> *How do I add the foreign key in the diagram view?*
> I want it to be comment_id in the wp_commentmeta table.
>
> Thanks in advance!
>
> Cheers,
>
> Mike
>
> _______________________________________________
> Valentina-studio mailing list
> Valentina-studio at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-studio
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina-studio/attachments/20140316/46b0534a/attachment.html>


More information about the Valentina-studio mailing list