User:Exor674/NewTable
Current
<graphviz> digraph G { userpic2 [URL="http://wiki.dwscoalition.org/notes/Database_Table:_userpic2"]; userpicmap2 [URL="http://wiki.dwscoalition.org/notes/Database_Table:_userpicmap2"; label="userpicmap2\nuserid, kwid, picid"; ]; userkeywords [URL="http://wiki.dwscoalition.org/notes/Database_Table:_userkeywords"];
userpic2 -> userpicmap2 [label="on picid"]; userpicmap2 -> userkeywords [label="on userid, kwid"]
ec [label="Entries and Comments"; style="dotted"];
ec->userkeywords [label="by keyword"]; } </graphviz>
New
<graphviz> digraph G { userpic2 [URL="http://wiki.dwscoalition.org/notes/Database_Table:_userpic2"]; userpicmap2 [URL="http://wiki.dwscoalition.org/notes/Database_Table:_userpicmap2"; label="userpicmap2\npicmapid, userid, kwid, picid"; ]; userkeywords [URL="http://wiki.dwscoalition.org/notes/Database_Table:_userkeywords"];
userpic2 -> userpicmap2 [label="on picid"]; userpicmap2 -> userkeywords [label="on userid, kwid"]
ec [label="Entries and Comments"; style="dotted"];
ec->userkeywords [label="by picmapid"]; } </graphviz>
code mods needed:
- leave rows around in userpicmap2 when the keyword goes away with picid of 0
- when renaming keywords, keep the same picmapid, change the kwid -- even if it creates duplicates
- when moving a keyword to a different userpic, keep the same picmapid, change the picid