User:Exor674/NewTable

From Dreamwidth Notes
< User:Exor674
Revision as of 18:03, 14 September 2010 by Exor674 (Talk | contribs)

Jump to: navigation, search

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