Use existing field as foreign key in the diagram view

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


* Correction: one the *left* side of the editor:

[image: Inline image 1]

--
Best regards,
Sergey Pashkov.


On Sun, Mar 16, 2014 at 3:03 PM, Sergey Pashkov <
sergey_pashkov at valentina-db.com> wrote:

> 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 right 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/847e4f5b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aacciheb.png
Type: image/png
Size: 30499 bytes
Desc: not available
URL: <http://lists.macserve.net/pipermail/valentina-studio/attachments/20140316/847e4f5b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2014-03-16 at 3.05.58 PM.png
Type: image/png
Size: 26924 bytes
Desc: not available
URL: <http://lists.macserve.net/pipermail/valentina-studio/attachments/20140316/847e4f5b/attachment-0003.png>


More information about the Valentina-studio mailing list