]> Nutra Git (v1) - nutratech/nt-sqlite.git/commitdiff
rename tables, cf, prep plugins, update svg
authorShane Jaroch <chown_tee@proton.me>
Thu, 14 Jul 2022 14:30:37 +0000 (10:30 -0400)
committerShane Jaroch <chown_tee@proton.me>
Thu, 14 Jul 2022 14:31:30 +0000 (10:31 -0400)
docs/nt.svg
sql/data/version.csv
sql/tables.sql

index 98c75f1e476e4aaa2262ef8a2906b23101583415..df0c4929c298b8033f75bffa71ae666b89df7cd8 100644 (file)
 <!-- Generated by graphviz version 2.43.0 (0)
  -->
 <!-- Title: undefined Pages: 1 -->
-<svg width="1159pt" height="1311pt"
- viewBox="0.00 0.00 1158.60 1310.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 1260.8)">
+<svg width="1718pt" height="1520pt"
+ viewBox="0.00 0.00 1717.60 1519.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 1469.8)">
 <title>undefined</title>
-<polygon fill="white" stroke="transparent" points="-28.8,49.8 -28.8,-1260.8 1129.8,-1260.8 1129.8,49.8 -28.8,49.8"/>
-<text text-anchor="start" x="506" y="12.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">sql/nt.sqlite3</text>
+<polygon fill="white" stroke="transparent" points="-28.8,49.8 -28.8,-1469.8 1688.8,-1469.8 1688.8,49.8 -28.8,49.8"/>
+<text text-anchor="start" x="785.5" y="12.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">sql/nt.sqlite3</text>
 <!-- version -->
 <g id="node1" class="node">
 <title>version</title>
-<path fill="none" stroke="black" d="M83.24,-781.64C83.24,-781.64 203.24,-781.64 203.24,-781.64 209.24,-781.64 215.24,-787.64 215.24,-793.64 215.24,-793.64 215.24,-873.64 215.24,-873.64 215.24,-879.64 209.24,-885.64 203.24,-885.64 203.24,-885.64 83.24,-885.64 83.24,-885.64 77.24,-885.64 71.24,-879.64 71.24,-873.64 71.24,-873.64 71.24,-793.64 71.24,-793.64 71.24,-787.64 77.24,-781.64 83.24,-781.64"/>
-<text text-anchor="start" x="116.24" y="-865.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">version</text>
-<polyline fill="none" stroke="black" points="71.24,-855.64 215.24,-855.64 "/>
-<text text-anchor="start" x="78.24" y="-842.04" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="99.24" y="-842.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="78.24" y="-825.04" font-family="Helvetica,sans-Serif" font-size="12.00">version </text>
-<text text-anchor="start" x="126.24" y="-825.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="78.24" y="-808.04" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="128.24" y="-808.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
-<text text-anchor="start" x="78.24" y="-791.04" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
-<text text-anchor="start" x="115.24" y="-791.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- bmr_eqs -->
+<path fill="none" stroke="black" d="M1440.24,-595.64C1440.24,-595.64 1560.24,-595.64 1560.24,-595.64 1566.24,-595.64 1572.24,-601.64 1572.24,-607.64 1572.24,-607.64 1572.24,-687.64 1572.24,-687.64 1572.24,-693.64 1566.24,-699.64 1560.24,-699.64 1560.24,-699.64 1440.24,-699.64 1440.24,-699.64 1434.24,-699.64 1428.24,-693.64 1428.24,-687.64 1428.24,-687.64 1428.24,-607.64 1428.24,-607.64 1428.24,-601.64 1434.24,-595.64 1440.24,-595.64"/>
+<text text-anchor="start" x="1473.24" y="-679.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">version</text>
+<polyline fill="none" stroke="black" points="1428.24,-669.64 1572.24,-669.64 "/>
+<text text-anchor="start" x="1435.24" y="-656.04" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="1456.24" y="-656.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="1435.24" y="-639.04" font-family="Helvetica,sans-Serif" font-size="12.00">version </text>
+<text text-anchor="start" x="1483.24" y="-639.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="1435.24" y="-622.04" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="1485.24" y="-622.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
+<text text-anchor="start" x="1435.24" y="-605.04" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
+<text text-anchor="start" x="1472.24" y="-605.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- bmr_eq -->
 <g id="node2" class="node">
-<title>bmr_eqs</title>
-<path fill="none" stroke="black" d="M237.74,-0.8C237.74,-0.8 357.74,-0.8 357.74,-0.8 363.74,-0.8 369.74,-6.8 369.74,-12.8 369.74,-12.8 369.74,-58.8 369.74,-58.8 369.74,-64.8 363.74,-70.8 357.74,-70.8 357.74,-70.8 237.74,-70.8 237.74,-70.8 231.74,-70.8 225.74,-64.8 225.74,-58.8 225.74,-58.8 225.74,-12.8 225.74,-12.8 225.74,-6.8 231.74,-0.8 237.74,-0.8"/>
-<text text-anchor="start" x="266.74" y="-50.4" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bmr_eqs</text>
-<polyline fill="none" stroke="black" points="225.74,-40.8 369.74,-40.8 "/>
-<text text-anchor="start" x="232.74" y="-27.2" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="253.74" y="-27.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="232.74" y="-10.2" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="271.74" y="-10.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- bf_eqs -->
+<title>bmr_eq</title>
+<path fill="none" stroke="black" d="M546.05,-275.03C546.05,-275.03 666.05,-275.03 666.05,-275.03 672.05,-275.03 678.05,-281.03 678.05,-287.03 678.05,-287.03 678.05,-333.03 678.05,-333.03 678.05,-339.03 672.05,-345.03 666.05,-345.03 666.05,-345.03 546.05,-345.03 546.05,-345.03 540.05,-345.03 534.05,-339.03 534.05,-333.03 534.05,-333.03 534.05,-287.03 534.05,-287.03 534.05,-281.03 540.05,-275.03 546.05,-275.03"/>
+<text text-anchor="start" x="579.05" y="-324.63" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bmr_eq</text>
+<polyline fill="none" stroke="black" points="534.05,-315.03 678.05,-315.03 "/>
+<text text-anchor="start" x="541.05" y="-301.43" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="562.05" y="-301.43" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="541.05" y="-284.43" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="580.05" y="-284.43" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- bf_eq -->
 <g id="node3" class="node">
-<title>bf_eqs</title>
-<path fill="none" stroke="black" d="M787.99,-237.02C787.99,-237.02 907.99,-237.02 907.99,-237.02 913.99,-237.02 919.99,-243.02 919.99,-249.02 919.99,-249.02 919.99,-295.02 919.99,-295.02 919.99,-301.02 913.99,-307.02 907.99,-307.02 907.99,-307.02 787.99,-307.02 787.99,-307.02 781.99,-307.02 775.99,-301.02 775.99,-295.02 775.99,-295.02 775.99,-249.02 775.99,-249.02 775.99,-243.02 781.99,-237.02 787.99,-237.02"/>
-<text text-anchor="start" x="823.99" y="-286.62" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bf_eqs</text>
-<polyline fill="none" stroke="black" points="775.99,-277.02 919.99,-277.02 "/>
-<text text-anchor="start" x="782.99" y="-263.42" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="803.99" y="-263.42" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="782.99" y="-246.42" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="821.99" y="-246.42" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- profiles -->
+<title>bf_eq</title>
+<path fill="none" stroke="black" d="M1527.93,-744.33C1527.93,-744.33 1647.93,-744.33 1647.93,-744.33 1653.93,-744.33 1659.93,-750.33 1659.93,-756.33 1659.93,-756.33 1659.93,-802.33 1659.93,-802.33 1659.93,-808.33 1653.93,-814.33 1647.93,-814.33 1647.93,-814.33 1527.93,-814.33 1527.93,-814.33 1521.93,-814.33 1515.93,-808.33 1515.93,-802.33 1515.93,-802.33 1515.93,-756.33 1515.93,-756.33 1515.93,-750.33 1521.93,-744.33 1527.93,-744.33"/>
+<text text-anchor="start" x="1567.93" y="-793.93" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bf_eq</text>
+<polyline fill="none" stroke="black" points="1515.93,-784.33 1659.93,-784.33 "/>
+<text text-anchor="start" x="1522.93" y="-770.73" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="1543.93" y="-770.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="1522.93" y="-753.73" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="1561.93" y="-753.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- profile -->
 <g id="node4" class="node">
-<title>profiles</title>
-<path fill="none" stroke="black" d="M445.13,-311.37C445.13,-311.37 565.13,-311.37 565.13,-311.37 571.13,-311.37 577.13,-317.37 577.13,-323.37 577.13,-323.37 577.13,-505.37 577.13,-505.37 577.13,-511.37 571.13,-517.37 565.13,-517.37 565.13,-517.37 445.13,-517.37 445.13,-517.37 439.13,-517.37 433.13,-511.37 433.13,-505.37 433.13,-505.37 433.13,-323.37 433.13,-323.37 433.13,-317.37 439.13,-311.37 445.13,-311.37"/>
-<text text-anchor="start" x="477.13" y="-496.97" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">profiles</text>
-<polyline fill="none" stroke="black" points="433.13,-487.37 577.13,-487.37 "/>
-<text text-anchor="start" x="440.13" y="-473.77" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="461.13" y="-473.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="440.13" y="-456.77" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="479.13" y="-456.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="440.13" y="-439.77" font-family="Helvetica,sans-Serif" font-size="12.00">gender </text>
-<text text-anchor="start" x="487.13" y="-439.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="440.13" y="-422.77" font-family="Helvetica,sans-Serif" font-size="12.00">dob </text>
-<text text-anchor="start" x="467.13" y="-422.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
-<text text-anchor="start" x="440.13" y="-405.77" font-family="Helvetica,sans-Serif" font-size="12.00">act_lvl </text>
-<text text-anchor="start" x="482.13" y="-405.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="440.13" y="-388.77" font-family="Helvetica,sans-Serif" font-size="12.00">goal_wt </text>
-<text text-anchor="start" x="490.13" y="-388.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="440.13" y="-371.77" font-family="Helvetica,sans-Serif" font-size="12.00">goal_bf </text>
-<text text-anchor="start" x="488.13" y="-371.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="440.13" y="-354.77" font-family="Helvetica,sans-Serif" font-size="12.00">bmr_eq_id </text>
-<text text-anchor="start" x="507.13" y="-354.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="440.13" y="-337.77" font-family="Helvetica,sans-Serif" font-size="12.00">bf_eq_id </text>
-<text text-anchor="start" x="494.13" y="-337.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="440.13" y="-320.77" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="490.13" y="-320.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- profiles&#45;&gt;bmr_eqs -->
+<title>profile</title>
+<path fill="none" stroke="black" d="M895.37,-671.22C895.37,-671.22 1015.37,-671.22 1015.37,-671.22 1021.37,-671.22 1027.37,-677.22 1027.37,-683.22 1027.37,-683.22 1027.37,-882.22 1027.37,-882.22 1027.37,-888.22 1021.37,-894.22 1015.37,-894.22 1015.37,-894.22 895.37,-894.22 895.37,-894.22 889.37,-894.22 883.37,-888.22 883.37,-882.22 883.37,-882.22 883.37,-683.22 883.37,-683.22 883.37,-677.22 889.37,-671.22 895.37,-671.22"/>
+<text text-anchor="start" x="931.37" y="-873.82" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">profile</text>
+<polyline fill="none" stroke="black" points="883.37,-864.22 1027.37,-864.22 "/>
+<text text-anchor="start" x="890.37" y="-850.12" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="911.37" y="-850.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="890.37" y="-833.12" font-family="Helvetica,sans-Serif" font-size="12.00">uuid </text>
+<text text-anchor="start" x="920.37" y="-833.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="890.37" y="-816.12" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="929.37" y="-816.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="890.37" y="-799.12" font-family="Helvetica,sans-Serif" font-size="12.00">gender </text>
+<text text-anchor="start" x="937.37" y="-799.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="890.37" y="-782.12" font-family="Helvetica,sans-Serif" font-size="12.00">dob </text>
+<text text-anchor="start" x="917.37" y="-782.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
+<text text-anchor="start" x="890.37" y="-765.12" font-family="Helvetica,sans-Serif" font-size="12.00">act_lvl </text>
+<text text-anchor="start" x="932.37" y="-765.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="890.37" y="-748.12" font-family="Helvetica,sans-Serif" font-size="12.00">goal_wt </text>
+<text text-anchor="start" x="940.37" y="-748.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="890.37" y="-731.12" font-family="Helvetica,sans-Serif" font-size="12.00">goal_bf </text>
+<text text-anchor="start" x="938.37" y="-731.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="890.37" y="-714.12" font-family="Helvetica,sans-Serif" font-size="12.00">bmr_eq_id </text>
+<text text-anchor="start" x="957.37" y="-714.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="890.37" y="-697.12" font-family="Helvetica,sans-Serif" font-size="12.00">bf_eq_id </text>
+<text text-anchor="start" x="944.37" y="-697.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="890.37" y="-680.12" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="940.37" y="-680.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+</g>
+<!-- profile&#45;&gt;bmr_eq -->
 <g id="edge2" class="edge">
-<title>profiles&#45;&gt;bmr_eqs</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M448.46,-310.93C406.57,-234.45 351.68,-134.27 321.03,-78.32"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="323.35,-76.73 317.06,-71.06 318.44,-79.42 323.35,-76.73"/>
+<title>profile&#45;&gt;bmr_eq</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M883.15,-736.62C830.05,-699.6 759.37,-643.36 713.16,-579.37 661.77,-508.22 630.69,-408.99 616.1,-352.97"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="618.76,-352.09 614.06,-345.03 613.33,-353.47 618.76,-352.09"/>
 </g>
-<!-- profiles&#45;&gt;bf_eqs -->
+<!-- profile&#45;&gt;bf_eq -->
 <g id="edge1" class="edge">
-<title>profiles&#45;&gt;bf_eqs</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M577.42,-384.36C633.27,-361.17 710.49,-329.1 768.15,-305.16"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="769.48,-307.64 775.79,-301.99 767.33,-302.47 769.48,-307.64"/>
+<title>profile&#45;&gt;bf_eq</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1027.62,-782.33C1146.73,-781.69 1383.45,-780.42 1507.63,-779.76"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="1507.66,-782.56 1515.64,-779.71 1507.63,-776.96 1507.66,-782.56"/>
 </g>
-<!-- recipes -->
+<!-- rda -->
 <g id="node5" class="node">
-<title>recipes</title>
-<path fill="none" stroke="black" d="M610.86,-1127.64C610.86,-1127.64 730.86,-1127.64 730.86,-1127.64 736.86,-1127.64 742.86,-1133.64 742.86,-1139.64 742.86,-1139.64 742.86,-1219.64 742.86,-1219.64 742.86,-1225.64 736.86,-1231.64 730.86,-1231.64 730.86,-1231.64 610.86,-1231.64 610.86,-1231.64 604.86,-1231.64 598.86,-1225.64 598.86,-1219.64 598.86,-1219.64 598.86,-1139.64 598.86,-1139.64 598.86,-1133.64 604.86,-1127.64 610.86,-1127.64"/>
-<text text-anchor="start" x="643.86" y="-1211.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipes</text>
-<polyline fill="none" stroke="black" points="598.86,-1201.64 742.86,-1201.64 "/>
-<text text-anchor="start" x="605.86" y="-1188.04" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="626.86" y="-1188.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="605.86" y="-1171.04" font-family="Helvetica,sans-Serif" font-size="12.00">tagname </text>
-<text text-anchor="start" x="663.86" y="-1171.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="605.86" y="-1154.04" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="644.86" y="-1154.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="605.86" y="-1137.04" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="655.86" y="-1137.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<title>rda</title>
+<path fill="none" stroke="black" d="M895.53,-1300.18C895.53,-1300.18 1015.53,-1300.18 1015.53,-1300.18 1021.53,-1300.18 1027.53,-1306.18 1027.53,-1312.18 1027.53,-1312.18 1027.53,-1375.18 1027.53,-1375.18 1027.53,-1381.18 1021.53,-1387.18 1015.53,-1387.18 1015.53,-1387.18 895.53,-1387.18 895.53,-1387.18 889.53,-1387.18 883.53,-1381.18 883.53,-1375.18 883.53,-1375.18 883.53,-1312.18 883.53,-1312.18 883.53,-1306.18 889.53,-1300.18 895.53,-1300.18"/>
+<text text-anchor="start" x="943.53" y="-1366.78" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">rda</text>
+<polyline fill="none" stroke="black" points="883.53,-1357.18 1027.53,-1357.18 "/>
+<text text-anchor="start" x="890.53" y="-1343.08" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id* </text>
+<text text-anchor="start" x="954.53" y="-1343.08" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="890.53" y="-1326.08" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id* </text>
+<text text-anchor="start" x="942.53" y="-1326.08" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="890.53" y="-1309.08" font-family="Helvetica,sans-Serif" font-size="12.00">rda </text>
+<text text-anchor="start" x="914.53" y="-1309.08" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
 </g>
-<!-- recipe_dat -->
-<g id="node6" class="node">
-<title>recipe_dat</title>
-<path fill="none" stroke="black" d="M860.24,-1062.45C860.24,-1062.45 980.24,-1062.45 980.24,-1062.45 986.24,-1062.45 992.24,-1068.45 992.24,-1074.45 992.24,-1074.45 992.24,-1171.45 992.24,-1171.45 992.24,-1177.45 986.24,-1183.45 980.24,-1183.45 980.24,-1183.45 860.24,-1183.45 860.24,-1183.45 854.24,-1183.45 848.24,-1177.45 848.24,-1171.45 848.24,-1171.45 848.24,-1074.45 848.24,-1074.45 848.24,-1068.45 854.24,-1062.45 860.24,-1062.45"/>
-<text text-anchor="start" x="882.24" y="-1163.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe_dat</text>
-<polyline fill="none" stroke="black" points="848.24,-1153.45 992.24,-1153.45 "/>
-<text text-anchor="start" x="855.24" y="-1139.35" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id* </text>
-<text text-anchor="start" x="919.24" y="-1139.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="855.24" y="-1122.35" font-family="Helvetica,sans-Serif" font-size="12.00">food_id* </text>
-<text text-anchor="start" x="909.24" y="-1122.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="855.24" y="-1105.35" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
-<text text-anchor="start" x="898.24" y="-1105.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="855.24" y="-1088.35" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
-<text text-anchor="start" x="892.24" y="-1088.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="855.24" y="-1071.35" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="905.24" y="-1071.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- recipe_dat&#45;&gt;recipes -->
+<!-- rda&#45;&gt;profile -->
 <g id="edge3" class="edge">
-<title>recipe_dat&#45;&gt;recipes</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M848.11,-1139.35C817.74,-1146.25 782.28,-1154.31 751.09,-1161.4"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="750.44,-1158.68 743.26,-1163.18 751.68,-1164.14 750.44,-1158.68"/>
+<title>rda&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M955.52,-1300.13C955.49,-1215.68 955.44,-1027.04 955.4,-902.39"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="958.2,-902.27 955.4,-894.27 952.6,-902.27 958.2,-902.27"/>
 </g>
-<!-- custom_foods -->
-<g id="node7" class="node">
-<title>custom_foods</title>
-<path fill="none" stroke="black" d="M793.24,-745.53C793.24,-745.53 913.24,-745.53 913.24,-745.53 919.24,-745.53 925.24,-751.53 925.24,-757.53 925.24,-757.53 925.24,-837.53 925.24,-837.53 925.24,-843.53 919.24,-849.53 913.24,-849.53 913.24,-849.53 793.24,-849.53 793.24,-849.53 787.24,-849.53 781.24,-843.53 781.24,-837.53 781.24,-837.53 781.24,-757.53 781.24,-757.53 781.24,-751.53 787.24,-745.53 793.24,-745.53"/>
-<text text-anchor="start" x="803.24" y="-829.13" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">custom_foods</text>
-<polyline fill="none" stroke="black" points="781.24,-819.53 925.24,-819.53 "/>
-<text text-anchor="start" x="788.24" y="-805.93" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="809.24" y="-805.93" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="788.24" y="-788.93" font-family="Helvetica,sans-Serif" font-size="12.00">tagname </text>
-<text text-anchor="start" x="846.24" y="-788.93" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="788.24" y="-771.93" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="827.24" y="-771.93" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="788.24" y="-754.93" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="838.24" y="-754.93" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<!-- custom_food -->
+<g id="node6" class="node">
+<title>custom_food</title>
+<path fill="none" stroke="black" d="M222.42,-1006.4C222.42,-1006.4 342.42,-1006.4 342.42,-1006.4 348.42,-1006.4 354.42,-1012.4 354.42,-1018.4 354.42,-1018.4 354.42,-1098.4 354.42,-1098.4 354.42,-1104.4 348.42,-1110.4 342.42,-1110.4 342.42,-1110.4 222.42,-1110.4 222.42,-1110.4 216.42,-1110.4 210.42,-1104.4 210.42,-1098.4 210.42,-1098.4 210.42,-1018.4 210.42,-1018.4 210.42,-1012.4 216.42,-1006.4 222.42,-1006.4"/>
+<text text-anchor="start" x="236.42" y="-1090" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">custom_food</text>
+<polyline fill="none" stroke="black" points="210.42,-1080.4 354.42,-1080.4 "/>
+<text text-anchor="start" x="217.42" y="-1066.8" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="238.42" y="-1066.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="217.42" y="-1049.8" font-family="Helvetica,sans-Serif" font-size="12.00">tagname </text>
+<text text-anchor="start" x="275.42" y="-1049.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="217.42" y="-1032.8" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="256.42" y="-1032.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="217.42" y="-1015.8" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="267.42" y="-1015.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
 </g>
 <!-- cf_dat -->
-<g id="node8" class="node">
+<g id="node7" class="node">
 <title>cf_dat</title>
-<path fill="none" stroke="black" d="M969.26,-710.73C969.26,-710.73 1089.26,-710.73 1089.26,-710.73 1095.26,-710.73 1101.26,-716.73 1101.26,-722.73 1101.26,-722.73 1101.26,-819.73 1101.26,-819.73 1101.26,-825.73 1095.26,-831.73 1089.26,-831.73 1089.26,-831.73 969.26,-831.73 969.26,-831.73 963.26,-831.73 957.26,-825.73 957.26,-819.73 957.26,-819.73 957.26,-722.73 957.26,-722.73 957.26,-716.73 963.26,-710.73 969.26,-710.73"/>
-<text text-anchor="start" x="1007.26" y="-811.33" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">cf_dat</text>
-<polyline fill="none" stroke="black" points="957.26,-801.73 1101.26,-801.73 "/>
-<text text-anchor="start" x="964.26" y="-787.63" font-family="Helvetica,sans-Serif" font-size="12.00">cf_id* </text>
-<text text-anchor="start" x="1002.26" y="-787.63" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="964.26" y="-770.63" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id* </text>
-<text text-anchor="start" x="1016.26" y="-770.63" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="964.26" y="-753.63" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_val </text>
-<text text-anchor="start" x="1016.26" y="-753.63" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="964.26" y="-736.63" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
-<text text-anchor="start" x="1001.26" y="-736.63" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="964.26" y="-719.63" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="1014.26" y="-719.63" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- cf_dat&#45;&gt;custom_foods -->
+<path fill="none" stroke="black" d="M173.41,-1319.39C173.41,-1319.39 293.41,-1319.39 293.41,-1319.39 299.41,-1319.39 305.41,-1325.39 305.41,-1331.39 305.41,-1331.39 305.41,-1428.39 305.41,-1428.39 305.41,-1434.39 299.41,-1440.39 293.41,-1440.39 293.41,-1440.39 173.41,-1440.39 173.41,-1440.39 167.41,-1440.39 161.41,-1434.39 161.41,-1428.39 161.41,-1428.39 161.41,-1331.39 161.41,-1331.39 161.41,-1325.39 167.41,-1319.39 173.41,-1319.39"/>
+<text text-anchor="start" x="211.41" y="-1419.99" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">cf_dat</text>
+<polyline fill="none" stroke="black" points="161.41,-1410.39 305.41,-1410.39 "/>
+<text text-anchor="start" x="168.41" y="-1396.29" font-family="Helvetica,sans-Serif" font-size="12.00">cf_id* </text>
+<text text-anchor="start" x="206.41" y="-1396.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="168.41" y="-1379.29" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id* </text>
+<text text-anchor="start" x="220.41" y="-1379.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="168.41" y="-1362.29" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_val </text>
+<text text-anchor="start" x="220.41" y="-1362.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="168.41" y="-1345.29" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
+<text text-anchor="start" x="205.41" y="-1345.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="168.41" y="-1328.29" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="218.41" y="-1328.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+</g>
+<!-- cf_dat&#45;&gt;custom_food -->
 <g id="edge4" class="edge">
-<title>cf_dat&#45;&gt;custom_foods</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M957.16,-782C949.49,-783.15 941.65,-784.32 933.89,-785.48"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="933.02,-782.78 925.52,-786.73 933.84,-788.32 933.02,-782.78"/>
+<title>cf_dat&#45;&gt;custom_food</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M242.68,-1319.04C251.44,-1261.61 264.49,-1176 273.22,-1118.73"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="276.04,-1118.83 274.48,-1110.5 270.5,-1117.98 276.04,-1118.83"/>
 </g>
-<!-- meal_name -->
+<!-- recipe -->
+<g id="node8" class="node">
+<title>recipe</title>
+<path fill="none" stroke="black" d="M728.36,-472.17C728.36,-472.17 848.36,-472.17 848.36,-472.17 854.36,-472.17 860.36,-478.17 860.36,-484.17 860.36,-484.17 860.36,-564.17 860.36,-564.17 860.36,-570.17 854.36,-576.17 848.36,-576.17 848.36,-576.17 728.36,-576.17 728.36,-576.17 722.36,-576.17 716.36,-570.17 716.36,-564.17 716.36,-564.17 716.36,-484.17 716.36,-484.17 716.36,-478.17 722.36,-472.17 728.36,-472.17"/>
+<text text-anchor="start" x="765.36" y="-555.77" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe</text>
+<polyline fill="none" stroke="black" points="716.36,-546.17 860.36,-546.17 "/>
+<text text-anchor="start" x="723.36" y="-532.57" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="744.36" y="-532.57" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="723.36" y="-515.57" font-family="Helvetica,sans-Serif" font-size="12.00">tagname </text>
+<text text-anchor="start" x="781.36" y="-515.57" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="723.36" y="-498.57" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="762.36" y="-498.57" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="723.36" y="-481.57" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="773.36" y="-481.57" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+</g>
+<!-- recipe_dat -->
 <g id="node9" class="node">
-<title>meal_name</title>
-<path fill="none" stroke="black" d="M243.03,-941.68C243.03,-941.68 363.03,-941.68 363.03,-941.68 369.03,-941.68 375.03,-947.68 375.03,-953.68 375.03,-953.68 375.03,-999.68 375.03,-999.68 375.03,-1005.68 369.03,-1011.68 363.03,-1011.68 363.03,-1011.68 243.03,-1011.68 243.03,-1011.68 237.03,-1011.68 231.03,-1005.68 231.03,-999.68 231.03,-999.68 231.03,-953.68 231.03,-953.68 231.03,-947.68 237.03,-941.68 243.03,-941.68"/>
-<text text-anchor="start" x="261.03" y="-991.28" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">meal_name</text>
-<polyline fill="none" stroke="black" points="231.03,-981.68 375.03,-981.68 "/>
-<text text-anchor="start" x="238.03" y="-968.08" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="259.03" y="-968.08" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="238.03" y="-951.08" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="277.03" y="-951.08" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- food_log -->
-<g id="node10" class="node">
-<title>food_log</title>
-<path fill="none" stroke="black" d="M328.62,-550.4C328.62,-550.4 448.62,-550.4 448.62,-550.4 454.62,-550.4 460.62,-556.4 460.62,-562.4 460.62,-562.4 460.62,-710.4 460.62,-710.4 460.62,-716.4 454.62,-722.4 448.62,-722.4 448.62,-722.4 328.62,-722.4 328.62,-722.4 322.62,-722.4 316.62,-716.4 316.62,-710.4 316.62,-710.4 316.62,-562.4 316.62,-562.4 316.62,-556.4 322.62,-550.4 328.62,-550.4"/>
-<text text-anchor="start" x="357.62" y="-702" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">food_log</text>
-<polyline fill="none" stroke="black" points="316.62,-692.4 460.62,-692.4 "/>
-<text text-anchor="start" x="323.62" y="-678.8" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="344.62" y="-678.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="323.62" y="-661.8" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
-<text text-anchor="start" x="381.62" y="-661.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="323.62" y="-644.8" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
-<text text-anchor="start" x="354.62" y="-644.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="323.62" y="-627.8" font-family="Helvetica,sans-Serif" font-size="12.00">meal_id </text>
-<text text-anchor="start" x="374.62" y="-627.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="323.62" y="-610.8" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="371.62" y="-610.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="323.62" y="-593.8" font-family="Helvetica,sans-Serif" font-size="12.00">msre_id </text>
-<text text-anchor="start" x="374.62" y="-593.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="323.62" y="-576.8" font-family="Helvetica,sans-Serif" font-size="12.00">amt </text>
-<text text-anchor="start" x="351.62" y="-576.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="323.62" y="-559.8" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="373.62" y="-559.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- food_log&#45;&gt;profiles -->
-<g id="edge6" class="edge">
-<title>food_log&#45;&gt;profiles</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M433.83,-550.24C438.23,-541.86 442.73,-533.28 447.23,-524.7"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="449.77,-525.89 451.01,-517.51 444.81,-523.29 449.77,-525.89"/>
+<title>recipe_dat</title>
+<path fill="none" stroke="black" d="M1368.37,-239.11C1368.37,-239.11 1488.37,-239.11 1488.37,-239.11 1494.37,-239.11 1500.37,-245.11 1500.37,-251.11 1500.37,-251.11 1500.37,-348.11 1500.37,-348.11 1500.37,-354.11 1494.37,-360.11 1488.37,-360.11 1488.37,-360.11 1368.37,-360.11 1368.37,-360.11 1362.37,-360.11 1356.37,-354.11 1356.37,-348.11 1356.37,-348.11 1356.37,-251.11 1356.37,-251.11 1356.37,-245.11 1362.37,-239.11 1368.37,-239.11"/>
+<text text-anchor="start" x="1390.37" y="-339.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe_dat</text>
+<polyline fill="none" stroke="black" points="1356.37,-330.11 1500.37,-330.11 "/>
+<text text-anchor="start" x="1363.37" y="-316.01" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id* </text>
+<text text-anchor="start" x="1427.37" y="-316.01" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1363.37" y="-299.01" font-family="Helvetica,sans-Serif" font-size="12.00">food_id* </text>
+<text text-anchor="start" x="1417.37" y="-299.01" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1363.37" y="-282.01" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
+<text text-anchor="start" x="1406.37" y="-282.01" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="1363.37" y="-265.01" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
+<text text-anchor="start" x="1400.37" y="-265.01" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="1363.37" y="-248.01" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="1413.37" y="-248.01" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
 </g>
-<!-- food_log&#45;&gt;meal_name -->
+<!-- recipe_dat&#45;&gt;recipe -->
 <g id="edge5" class="edge">
-<title>food_log&#45;&gt;meal_name</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M366.91,-722.7C349.95,-790.13 327.11,-880.97 313.83,-933.74"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="311.1,-933.12 311.87,-941.56 316.53,-934.49 311.1,-933.12"/>
+<title>recipe_dat&#45;&gt;recipe</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1356.2,-324.94C1235.64,-367.24 994.16,-451.96 868.5,-496.06"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="867.38,-493.48 860.76,-498.77 869.24,-498.76 867.38,-493.48"/>
 </g>
-<!-- recipe_log -->
-<g id="node11" class="node">
-<title>recipe_log</title>
-<path fill="none" stroke="black" d="M553.17,-719.69C553.17,-719.69 673.17,-719.69 673.17,-719.69 679.17,-719.69 685.17,-725.69 685.17,-731.69 685.17,-731.69 685.17,-862.69 685.17,-862.69 685.17,-868.69 679.17,-874.69 673.17,-874.69 673.17,-874.69 553.17,-874.69 553.17,-874.69 547.17,-874.69 541.17,-868.69 541.17,-862.69 541.17,-862.69 541.17,-731.69 541.17,-731.69 541.17,-725.69 547.17,-719.69 553.17,-719.69"/>
-<text text-anchor="start" x="575.17" y="-854.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe_log</text>
-<polyline fill="none" stroke="black" points="541.17,-844.69 685.17,-844.69 "/>
-<text text-anchor="start" x="548.17" y="-830.59" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="569.17" y="-830.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="548.17" y="-813.59" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
-<text text-anchor="start" x="606.17" y="-813.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="548.17" y="-796.59" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
-<text text-anchor="start" x="579.17" y="-796.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="548.17" y="-779.59" font-family="Helvetica,sans-Serif" font-size="12.00">meal_id </text>
-<text text-anchor="start" x="599.17" y="-779.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="548.17" y="-762.59" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id </text>
-<text text-anchor="start" x="606.17" y="-762.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="548.17" y="-745.59" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
-<text text-anchor="start" x="591.17" y="-745.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="548.17" y="-728.59" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="598.17" y="-728.59" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- recipe_log&#45;&gt;profiles -->
-<g id="edge9" class="edge">
-<title>recipe_log&#45;&gt;profiles</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M591.18,-719.26C575.44,-663.5 554.03,-587.62 536.5,-525.51"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="539.14,-524.56 534.27,-517.62 533.75,-526.08 539.14,-524.56"/>
+<!-- recipe_dat_cf -->
+<g id="node10" class="node">
+<title>recipe_dat_cf</title>
+<path fill="none" stroke="black" d="M342.32,-499.71C342.32,-499.71 462.32,-499.71 462.32,-499.71 468.32,-499.71 474.32,-505.71 474.32,-511.71 474.32,-511.71 474.32,-608.71 474.32,-608.71 474.32,-614.71 468.32,-620.71 462.32,-620.71 462.32,-620.71 342.32,-620.71 342.32,-620.71 336.32,-620.71 330.32,-614.71 330.32,-608.71 330.32,-608.71 330.32,-511.71 330.32,-511.71 330.32,-505.71 336.32,-499.71 342.32,-499.71"/>
+<text text-anchor="start" x="354.32" y="-600.31" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe_dat_cf</text>
+<polyline fill="none" stroke="black" points="330.32,-590.71 474.32,-590.71 "/>
+<text text-anchor="start" x="337.32" y="-576.61" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id* </text>
+<text text-anchor="start" x="401.32" y="-576.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="337.32" y="-559.61" font-family="Helvetica,sans-Serif" font-size="12.00">custom_food_id* </text>
+<text text-anchor="start" x="441.32" y="-559.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="337.32" y="-542.61" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
+<text text-anchor="start" x="380.32" y="-542.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="337.32" y="-525.61" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
+<text text-anchor="start" x="374.32" y="-525.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="337.32" y="-508.61" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="387.32" y="-508.61" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
 </g>
-<!-- recipe_log&#45;&gt;recipes -->
+<!-- recipe_dat_cf&#45;&gt;recipe -->
 <g id="edge7" class="edge">
-<title>recipe_log&#45;&gt;recipes</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M624.92,-875.05C635.82,-947.31 651.81,-1053.37 661.77,-1119.37"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="659.05,-1120.12 663.01,-1127.62 664.59,-1119.29 659.05,-1120.12"/>
+<title>recipe_dat_cf&#45;&gt;recipe</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M474.48,-553.48C540.85,-547.28 639.13,-538.11 707.98,-531.68"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="708.52,-534.44 716.23,-530.91 708,-528.86 708.52,-534.44"/>
 </g>
-<!-- recipe_log&#45;&gt;meal_name -->
-<g id="edge8" class="edge">
-<title>recipe_log&#45;&gt;meal_name</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M540.85,-839.05C489.48,-868.78 420.98,-908.42 370.69,-937.53"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="369.24,-935.13 363.72,-941.56 372.04,-939.98 369.24,-935.13"/>
+<!-- cf -->
+<g id="node19" class="node">
+<title>cf</title>
+<path fill="none" stroke="black" d="M12.38,-368.14C12.38,-368.14 42.38,-368.14 42.38,-368.14 48.38,-368.14 54.38,-374.14 54.38,-380.14 54.38,-380.14 54.38,-392.14 54.38,-392.14 54.38,-398.14 48.38,-404.14 42.38,-404.14 42.38,-404.14 12.38,-404.14 12.38,-404.14 6.38,-404.14 0.38,-398.14 0.38,-392.14 0.38,-392.14 0.38,-380.14 0.38,-380.14 0.38,-374.14 6.38,-368.14 12.38,-368.14"/>
+<text text-anchor="middle" x="27.38" y="-383.04" font-family="Helvetica,sans-Serif" font-size="12.00">cf</text>
 </g>
-<!-- rda -->
+<!-- recipe_dat_cf&#45;&gt;cf -->
+<g id="edge6" class="edge">
+<title>recipe_dat_cf&#45;&gt;cf</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M330.03,-526.65C249.42,-489.23 122.43,-430.27 61.81,-402.12"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="62.84,-399.51 54.4,-398.68 60.48,-404.59 62.84,-399.51"/>
+</g>
+<!-- meal_name -->
+<g id="node11" class="node">
+<title>meal_name</title>
+<path fill="none" stroke="black" d="M1025.48,-462.45C1025.48,-462.45 1145.48,-462.45 1145.48,-462.45 1151.48,-462.45 1157.48,-468.45 1157.48,-474.45 1157.48,-474.45 1157.48,-520.45 1157.48,-520.45 1157.48,-526.45 1151.48,-532.45 1145.48,-532.45 1145.48,-532.45 1025.48,-532.45 1025.48,-532.45 1019.48,-532.45 1013.48,-526.45 1013.48,-520.45 1013.48,-520.45 1013.48,-474.45 1013.48,-474.45 1013.48,-468.45 1019.48,-462.45 1025.48,-462.45"/>
+<text text-anchor="start" x="1043.48" y="-512.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">meal_name</text>
+<polyline fill="none" stroke="black" points="1013.48,-502.45 1157.48,-502.45 "/>
+<text text-anchor="start" x="1020.48" y="-488.85" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="1041.48" y="-488.85" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="1020.48" y="-471.85" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="1059.48" y="-471.85" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- log_food -->
 <g id="node12" class="node">
-<title>rda</title>
-<path fill="none" stroke="black" d="M18.78,-247.93C18.78,-247.93 138.78,-247.93 138.78,-247.93 144.78,-247.93 150.78,-253.93 150.78,-259.93 150.78,-259.93 150.78,-322.93 150.78,-322.93 150.78,-328.93 144.78,-334.93 138.78,-334.93 138.78,-334.93 18.78,-334.93 18.78,-334.93 12.78,-334.93 6.78,-328.93 6.78,-322.93 6.78,-322.93 6.78,-259.93 6.78,-259.93 6.78,-253.93 12.78,-247.93 18.78,-247.93"/>
-<text text-anchor="start" x="66.78" y="-314.53" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">rda</text>
-<polyline fill="none" stroke="black" points="6.78,-304.93 150.78,-304.93 "/>
-<text text-anchor="start" x="13.78" y="-290.83" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id* </text>
-<text text-anchor="start" x="77.78" y="-290.83" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="13.78" y="-273.83" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id* </text>
-<text text-anchor="start" x="65.78" y="-273.83" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="13.78" y="-256.83" font-family="Helvetica,sans-Serif" font-size="12.00">rda </text>
-<text text-anchor="start" x="37.78" y="-256.83" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-</g>
-<!-- rda&#45;&gt;profiles -->
-<g id="edge10" class="edge">
-<title>rda&#45;&gt;profiles</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M151.11,-312.29C227.02,-334.18 346.06,-368.51 424.84,-391.22"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="424.35,-393.99 432.81,-393.52 425.9,-388.61 424.35,-393.99"/>
+<title>log_food</title>
+<path fill="none" stroke="black" d="M822.07,-95.52C822.07,-95.52 942.07,-95.52 942.07,-95.52 948.07,-95.52 954.07,-101.52 954.07,-107.52 954.07,-107.52 954.07,-255.52 954.07,-255.52 954.07,-261.52 948.07,-267.52 942.07,-267.52 942.07,-267.52 822.07,-267.52 822.07,-267.52 816.07,-267.52 810.07,-261.52 810.07,-255.52 810.07,-255.52 810.07,-107.52 810.07,-107.52 810.07,-101.52 816.07,-95.52 822.07,-95.52"/>
+<text text-anchor="start" x="851.07" y="-247.12" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">log_food</text>
+<polyline fill="none" stroke="black" points="810.07,-237.52 954.07,-237.52 "/>
+<text text-anchor="start" x="817.07" y="-223.92" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="838.07" y="-223.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="817.07" y="-206.92" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
+<text text-anchor="start" x="875.07" y="-206.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="817.07" y="-189.92" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
+<text text-anchor="start" x="848.07" y="-189.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="817.07" y="-172.92" font-family="Helvetica,sans-Serif" font-size="12.00">meal_id </text>
+<text text-anchor="start" x="868.07" y="-172.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="817.07" y="-155.92" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="865.07" y="-155.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="817.07" y="-138.92" font-family="Helvetica,sans-Serif" font-size="12.00">msre_id </text>
+<text text-anchor="start" x="868.07" y="-138.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="817.07" y="-121.92" font-family="Helvetica,sans-Serif" font-size="12.00">amt </text>
+<text text-anchor="start" x="845.07" y="-121.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="817.07" y="-104.92" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="867.07" y="-104.92" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+</g>
+<!-- log_food&#45;&gt;profile -->
+<g id="edge9" class="edge">
+<title>log_food&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M892.58,-267.65C905.23,-371.44 926.56,-546.4 940.8,-663.2"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="938.02,-663.56 941.77,-671.16 943.58,-662.88 938.02,-663.56"/>
+</g>
+<!-- log_food&#45;&gt;meal_name -->
+<g id="edge8" class="edge">
+<title>log_food&#45;&gt;meal_name</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M937.66,-267.85C976.9,-328.79 1027.76,-407.79 1058.44,-455.44"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="1056.13,-457.03 1062.81,-462.24 1060.84,-454 1056.13,-457.03"/>
 </g>
-<!-- food_cost -->
+<!-- log_cf -->
 <g id="node13" class="node">
-<title>food_cost</title>
-<path fill="none" stroke="black" d="M587.84,-2.72C587.84,-2.72 707.84,-2.72 707.84,-2.72 713.84,-2.72 719.84,-8.72 719.84,-14.72 719.84,-14.72 719.84,-77.72 719.84,-77.72 719.84,-83.72 713.84,-89.72 707.84,-89.72 707.84,-89.72 587.84,-89.72 587.84,-89.72 581.84,-89.72 575.84,-83.72 575.84,-77.72 575.84,-77.72 575.84,-14.72 575.84,-14.72 575.84,-8.72 581.84,-2.72 587.84,-2.72"/>
-<text text-anchor="start" x="612.84" y="-69.32" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">food_cost</text>
-<polyline fill="none" stroke="black" points="575.84,-59.72 719.84,-59.72 "/>
-<text text-anchor="start" x="582.84" y="-45.62" font-family="Helvetica,sans-Serif" font-size="12.00">food_id* </text>
-<text text-anchor="start" x="636.84" y="-45.62" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="582.84" y="-28.62" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id* </text>
-<text text-anchor="start" x="646.84" y="-28.62" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="582.84" y="-11.62" font-family="Helvetica,sans-Serif" font-size="12.00">cost </text>
-<text text-anchor="start" x="611.84" y="-11.62" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-</g>
-<!-- food_cost&#45;&gt;profiles -->
+<title>log_cf</title>
+<path fill="none" stroke="black" d="M647.05,-678.06C647.05,-678.06 767.05,-678.06 767.05,-678.06 773.05,-678.06 779.05,-684.06 779.05,-690.06 779.05,-690.06 779.05,-855.06 779.05,-855.06 779.05,-861.06 773.05,-867.06 767.05,-867.06 767.05,-867.06 647.05,-867.06 647.05,-867.06 641.05,-867.06 635.05,-861.06 635.05,-855.06 635.05,-855.06 635.05,-690.06 635.05,-690.06 635.05,-684.06 641.05,-678.06 647.05,-678.06"/>
+<text text-anchor="start" x="686.05" y="-846.66" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">log_cf</text>
+<polyline fill="none" stroke="black" points="635.05,-837.06 779.05,-837.06 "/>
+<text text-anchor="start" x="642.05" y="-822.96" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="663.05" y="-822.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="642.05" y="-805.96" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
+<text text-anchor="start" x="700.05" y="-805.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="642.05" y="-788.96" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
+<text text-anchor="start" x="673.05" y="-788.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="642.05" y="-771.96" font-family="Helvetica,sans-Serif" font-size="12.00">meal_id </text>
+<text text-anchor="start" x="693.05" y="-771.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="642.05" y="-754.96" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="690.05" y="-754.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="642.05" y="-737.96" font-family="Helvetica,sans-Serif" font-size="12.00">custom_food_id </text>
+<text text-anchor="start" x="740.05" y="-737.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="642.05" y="-720.96" font-family="Helvetica,sans-Serif" font-size="12.00">msre_id </text>
+<text text-anchor="start" x="693.05" y="-720.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="642.05" y="-703.96" font-family="Helvetica,sans-Serif" font-size="12.00">amt </text>
+<text text-anchor="start" x="670.05" y="-703.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="642.05" y="-686.96" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="692.05" y="-686.96" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+</g>
+<!-- log_cf&#45;&gt;profile -->
+<g id="edge12" class="edge">
+<title>log_cf&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M779.2,-775.51C809.18,-776.74 844.08,-778.16 874.88,-779.42"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="874.92,-782.23 883.03,-779.76 875.15,-776.63 874.92,-782.23"/>
+</g>
+<!-- log_cf&#45;&gt;custom_food -->
+<g id="edge10" class="edge">
+<title>log_cf&#45;&gt;custom_food</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M635.01,-821.05C559.1,-872.15 439.89,-952.4 361.44,-1005.21"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="359.52,-1003.12 354.45,-1009.91 362.65,-1007.77 359.52,-1003.12"/>
+</g>
+<!-- log_cf&#45;&gt;meal_name -->
 <g id="edge11" class="edge">
-<title>food_cost&#45;&gt;profiles</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M630.91,-89.9C610.65,-142.18 575.96,-231.67 548.14,-303.44"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="545.4,-302.74 545.12,-311.21 550.62,-304.76 545.4,-302.74"/>
+<title>log_cf&#45;&gt;meal_name</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M779.12,-720.16C852.31,-666.96 964.04,-585.73 1030.42,-537.47"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="1032.27,-539.59 1037.1,-532.62 1028.98,-535.06 1032.27,-539.59"/>
 </g>
-<!-- bug -->
+<!-- log_recipe -->
 <g id="node14" class="node">
+<title>log_recipe</title>
+<path fill="none" stroke="black" d="M1171.6,-565.46C1171.6,-565.46 1291.6,-565.46 1291.6,-565.46 1297.6,-565.46 1303.6,-571.46 1303.6,-577.46 1303.6,-577.46 1303.6,-708.46 1303.6,-708.46 1303.6,-714.46 1297.6,-720.46 1291.6,-720.46 1291.6,-720.46 1171.6,-720.46 1171.6,-720.46 1165.6,-720.46 1159.6,-714.46 1159.6,-708.46 1159.6,-708.46 1159.6,-577.46 1159.6,-577.46 1159.6,-571.46 1165.6,-565.46 1171.6,-565.46"/>
+<text text-anchor="start" x="1193.6" y="-700.06" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">log_recipe</text>
+<polyline fill="none" stroke="black" points="1159.6,-690.46 1303.6,-690.46 "/>
+<text text-anchor="start" x="1166.6" y="-676.36" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="1187.6" y="-676.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="1166.6" y="-659.36" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
+<text text-anchor="start" x="1224.6" y="-659.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1166.6" y="-642.36" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
+<text text-anchor="start" x="1197.6" y="-642.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1166.6" y="-625.36" font-family="Helvetica,sans-Serif" font-size="12.00">meal_id </text>
+<text text-anchor="start" x="1217.6" y="-625.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1166.6" y="-608.36" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id </text>
+<text text-anchor="start" x="1224.6" y="-608.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1166.6" y="-591.36" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
+<text text-anchor="start" x="1209.6" y="-591.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="1166.6" y="-574.36" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="1216.6" y="-574.36" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+</g>
+<!-- log_recipe&#45;&gt;profile -->
+<g id="edge15" class="edge">
+<title>log_recipe&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1159.39,-679.5C1121.16,-698.84 1074.14,-722.63 1034.88,-742.49"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="1033.52,-740.04 1027.64,-746.15 1036.04,-745.04 1033.52,-740.04"/>
+</g>
+<!-- log_recipe&#45;&gt;recipe -->
+<g id="edge13" class="edge">
+<title>log_recipe&#45;&gt;recipe</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1159.4,-623.61C1079.55,-602.21 951.27,-567.83 868.41,-545.63"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="868.98,-542.88 860.53,-543.52 867.53,-548.29 868.98,-542.88"/>
+</g>
+<!-- log_recipe&#45;&gt;meal_name -->
+<g id="edge14" class="edge">
+<title>log_recipe&#45;&gt;meal_name</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1159.4,-571.06C1148.22,-559.92 1137.01,-548.77 1126.83,-538.62"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="1128.6,-536.44 1120.95,-532.77 1124.65,-540.4 1128.6,-536.44"/>
+</g>
+<!-- cost_food -->
+<g id="node15" class="node">
+<title>cost_food</title>
+<path fill="none" stroke="black" d="M1358.5,-1188.82C1358.5,-1188.82 1478.5,-1188.82 1478.5,-1188.82 1484.5,-1188.82 1490.5,-1194.82 1490.5,-1200.82 1490.5,-1200.82 1490.5,-1263.82 1490.5,-1263.82 1490.5,-1269.82 1484.5,-1275.82 1478.5,-1275.82 1478.5,-1275.82 1358.5,-1275.82 1358.5,-1275.82 1352.5,-1275.82 1346.5,-1269.82 1346.5,-1263.82 1346.5,-1263.82 1346.5,-1200.82 1346.5,-1200.82 1346.5,-1194.82 1352.5,-1188.82 1358.5,-1188.82"/>
+<text text-anchor="start" x="1383.5" y="-1255.42" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">cost_food</text>
+<polyline fill="none" stroke="black" points="1346.5,-1245.82 1490.5,-1245.82 "/>
+<text text-anchor="start" x="1353.5" y="-1231.72" font-family="Helvetica,sans-Serif" font-size="12.00">food_id* </text>
+<text text-anchor="start" x="1407.5" y="-1231.72" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1353.5" y="-1214.72" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id* </text>
+<text text-anchor="start" x="1417.5" y="-1214.72" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1353.5" y="-1197.72" font-family="Helvetica,sans-Serif" font-size="12.00">cost </text>
+<text text-anchor="start" x="1382.5" y="-1197.72" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+</g>
+<!-- cost_food&#45;&gt;profile -->
+<g id="edge16" class="edge">
+<title>cost_food&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1373.67,-1188.8C1294.99,-1112.42 1131.15,-953.36 1033.49,-858.56"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="1035.43,-856.54 1027.74,-852.97 1031.53,-860.55 1035.43,-856.54"/>
+</g>
+<!-- cost_cf -->
+<g id="node16" class="node">
+<title>cost_cf</title>
+<path fill="none" stroke="black" d="M619.47,-1091.49C619.47,-1091.49 739.47,-1091.49 739.47,-1091.49 745.47,-1091.49 751.47,-1097.49 751.47,-1103.49 751.47,-1103.49 751.47,-1166.49 751.47,-1166.49 751.47,-1172.49 745.47,-1178.49 739.47,-1178.49 739.47,-1178.49 619.47,-1178.49 619.47,-1178.49 613.47,-1178.49 607.47,-1172.49 607.47,-1166.49 607.47,-1166.49 607.47,-1103.49 607.47,-1103.49 607.47,-1097.49 613.47,-1091.49 619.47,-1091.49"/>
+<text text-anchor="start" x="654.47" y="-1158.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">cost_cf</text>
+<polyline fill="none" stroke="black" points="607.47,-1148.49 751.47,-1148.49 "/>
+<text text-anchor="start" x="614.47" y="-1134.39" font-family="Helvetica,sans-Serif" font-size="12.00">custom_food_id* </text>
+<text text-anchor="start" x="718.47" y="-1134.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="614.47" y="-1117.39" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id* </text>
+<text text-anchor="start" x="678.47" y="-1117.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="614.47" y="-1100.39" font-family="Helvetica,sans-Serif" font-size="12.00">cost </text>
+<text text-anchor="start" x="643.47" y="-1100.39" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+</g>
+<!-- cost_cf&#45;&gt;profile -->
+<g id="edge17" class="edge">
+<title>cost_cf&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M713.57,-1091.44C754.36,-1039.37 823.88,-950.6 877.94,-881.57"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="880.39,-882.98 883.12,-874.96 875.99,-879.53 880.39,-882.98"/>
+</g>
+<!-- cost_cf&#45;&gt;custom_food -->
+<g id="edge18" class="edge">
+<title>cost_cf&#45;&gt;custom_food</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M607.1,-1121.03C538.08,-1107.72 434.3,-1087.7 362.75,-1073.89"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="363.01,-1071.09 354.62,-1072.33 361.95,-1076.59 363.01,-1071.09"/>
+</g>
+<!-- bug -->
+<g id="node17" class="node">
 <title>bug</title>
-<path fill="none" stroke="black" d="M735.35,-476.61C735.35,-476.61 855.35,-476.61 855.35,-476.61 861.35,-476.61 867.35,-482.61 867.35,-488.61 867.35,-488.61 867.35,-653.61 867.35,-653.61 867.35,-659.61 861.35,-665.61 855.35,-665.61 855.35,-665.61 735.35,-665.61 735.35,-665.61 729.35,-665.61 723.35,-659.61 723.35,-653.61 723.35,-653.61 723.35,-488.61 723.35,-488.61 723.35,-482.61 729.35,-476.61 735.35,-476.61"/>
-<text text-anchor="start" x="781.35" y="-645.21" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bug</text>
-<polyline fill="none" stroke="black" points="723.35,-635.61 867.35,-635.61 "/>
-<text text-anchor="start" x="730.35" y="-621.51" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="751.35" y="-621.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="730.35" y="-604.51" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
-<text text-anchor="start" x="788.35" y="-604.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.35" y="-587.51" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="780.35" y="-587.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.35" y="-570.51" font-family="Helvetica,sans-Serif" font-size="12.00">arguments </text>
-<text text-anchor="start" x="799.35" y="-570.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="730.35" y="-553.51" font-family="Helvetica,sans-Serif" font-size="12.00">stack </text>
-<text text-anchor="start" x="766.35" y="-553.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="730.35" y="-536.51" font-family="Helvetica,sans-Serif" font-size="12.00">os </text>
-<text text-anchor="start" x="748.35" y="-536.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="730.35" y="-519.51" font-family="Helvetica,sans-Serif" font-size="12.00">py_ver </text>
-<text text-anchor="start" x="774.35" y="-519.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="730.35" y="-502.51" font-family="Helvetica,sans-Serif" font-size="12.00">user_details </text>
-<text text-anchor="start" x="806.35" y="-502.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="730.35" y="-485.51" font-family="Helvetica,sans-Serif" font-size="12.00">submitted </text>
-<text text-anchor="start" x="794.35" y="-485.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">tinyint</text>
-</g>
-<!-- bug&#45;&gt;profiles -->
-<g id="edge12" class="edge">
-<title>bug&#45;&gt;profiles</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M723.23,-532.17C681.09,-509.41 627.85,-480.65 584.52,-457.25"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="585.75,-454.73 577.38,-453.39 583.08,-459.66 585.75,-454.73"/>
+<path fill="none" stroke="black" d="M1007.66,-983.2C1007.66,-983.2 1127.66,-983.2 1127.66,-983.2 1133.66,-983.2 1139.66,-989.2 1139.66,-995.2 1139.66,-995.2 1139.66,-1177.2 1139.66,-1177.2 1139.66,-1183.2 1133.66,-1189.2 1127.66,-1189.2 1127.66,-1189.2 1007.66,-1189.2 1007.66,-1189.2 1001.66,-1189.2 995.66,-1183.2 995.66,-1177.2 995.66,-1177.2 995.66,-995.2 995.66,-995.2 995.66,-989.2 1001.66,-983.2 1007.66,-983.2"/>
+<text text-anchor="start" x="1053.66" y="-1168.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bug</text>
+<polyline fill="none" stroke="black" points="995.66,-1159.2 1139.66,-1159.2 "/>
+<text text-anchor="start" x="1002.66" y="-1145.6" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="1023.66" y="-1145.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="1002.66" y="-1128.6" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
+<text text-anchor="start" x="1060.66" y="-1128.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1002.66" y="-1111.6" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="1052.66" y="-1111.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1002.66" y="-1094.6" font-family="Helvetica,sans-Serif" font-size="12.00">arguments </text>
+<text text-anchor="start" x="1071.66" y="-1094.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="1002.66" y="-1077.6" font-family="Helvetica,sans-Serif" font-size="12.00">activity </text>
+<text text-anchor="start" x="1049.66" y="-1077.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="1002.66" y="-1060.6" font-family="Helvetica,sans-Serif" font-size="12.00">stack </text>
+<text text-anchor="start" x="1038.66" y="-1060.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="1002.66" y="-1043.6" font-family="Helvetica,sans-Serif" font-size="12.00">client_info </text>
+<text text-anchor="start" x="1067.66" y="-1043.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">json</text>
+<text text-anchor="start" x="1002.66" y="-1026.6" font-family="Helvetica,sans-Serif" font-size="12.00">app_info </text>
+<text text-anchor="start" x="1057.66" y="-1026.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">json</text>
+<text text-anchor="start" x="1002.66" y="-1009.6" font-family="Helvetica,sans-Serif" font-size="12.00">user_details </text>
+<text text-anchor="start" x="1078.66" y="-1009.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">json</text>
+<text text-anchor="start" x="1002.66" y="-992.6" font-family="Helvetica,sans-Serif" font-size="12.00">submitted </text>
+<text text-anchor="start" x="1066.66" y="-992.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">tinyint</text>
+</g>
+<!-- bug&#45;&gt;profile -->
+<g id="edge19" class="edge">
+<title>bug&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1029.48,-983.03C1019.84,-956.96 1009.4,-928.75 999.48,-901.95"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="1002.11,-900.97 996.7,-894.43 996.85,-902.91 1002.11,-900.97"/>
 </g>
 <!-- msg -->
-<g id="node15" class="node">
+<g id="node18" class="node">
 <title>msg</title>
-<path fill="none" stroke="black" d="M11.85,-516.13C11.85,-516.13 131.85,-516.13 131.85,-516.13 137.85,-516.13 143.85,-522.13 143.85,-528.13 143.85,-528.13 143.85,-659.13 143.85,-659.13 143.85,-665.13 137.85,-671.13 131.85,-671.13 131.85,-671.13 11.85,-671.13 11.85,-671.13 5.85,-671.13 -0.15,-665.13 -0.15,-659.13 -0.15,-659.13 -0.15,-528.13 -0.15,-528.13 -0.15,-522.13 5.85,-516.13 11.85,-516.13"/>
-<text text-anchor="start" x="56.85" y="-650.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">msg</text>
-<polyline fill="none" stroke="black" points="-0.15,-641.13 143.85,-641.13 "/>
-<text text-anchor="start" x="6.85" y="-627.03" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="27.85" y="-627.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="6.85" y="-610.03" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
-<text text-anchor="start" x="64.85" y="-610.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="6.85" y="-593.03" font-family="Helvetica,sans-Serif" font-size="12.00">msg_id </text>
-<text text-anchor="start" x="52.85" y="-593.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="6.85" y="-576.03" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="56.85" y="-576.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="6.85" y="-559.03" font-family="Helvetica,sans-Serif" font-size="12.00">received </text>
-<text text-anchor="start" x="61.85" y="-559.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="6.85" y="-542.03" font-family="Helvetica,sans-Serif" font-size="12.00">header </text>
-<text text-anchor="start" x="53.85" y="-542.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="6.85" y="-525.03" font-family="Helvetica,sans-Serif" font-size="12.00">body </text>
-<text text-anchor="start" x="40.85" y="-525.03" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- msg&#45;&gt;profiles -->
-<g id="edge13" class="edge">
-<title>msg&#45;&gt;profiles</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M143.89,-563.83C221.52,-531.71 344.73,-480.73 425.27,-447.41"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="426.61,-449.89 432.93,-444.25 424.46,-444.72 426.61,-449.89"/>
+<path fill="none" stroke="black" d="M1174.61,-0.15C1174.61,-0.15 1294.61,-0.15 1294.61,-0.15 1300.61,-0.15 1306.61,-6.15 1306.61,-12.15 1306.61,-12.15 1306.61,-143.15 1306.61,-143.15 1306.61,-149.15 1300.61,-155.15 1294.61,-155.15 1294.61,-155.15 1174.61,-155.15 1174.61,-155.15 1168.61,-155.15 1162.61,-149.15 1162.61,-143.15 1162.61,-143.15 1162.61,-12.15 1162.61,-12.15 1162.61,-6.15 1168.61,-0.15 1174.61,-0.15"/>
+<text text-anchor="start" x="1219.61" y="-134.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">msg</text>
+<polyline fill="none" stroke="black" points="1162.61,-125.15 1306.61,-125.15 "/>
+<text text-anchor="start" x="1169.61" y="-111.05" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="1190.61" y="-111.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="1169.61" y="-94.05" font-family="Helvetica,sans-Serif" font-size="12.00">profile_id </text>
+<text text-anchor="start" x="1227.61" y="-94.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1169.61" y="-77.05" font-family="Helvetica,sans-Serif" font-size="12.00">msg_id </text>
+<text text-anchor="start" x="1215.61" y="-77.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1169.61" y="-60.05" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="1219.61" y="-60.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1169.61" y="-43.05" font-family="Helvetica,sans-Serif" font-size="12.00">received </text>
+<text text-anchor="start" x="1224.61" y="-43.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="1169.61" y="-26.05" font-family="Helvetica,sans-Serif" font-size="12.00">header </text>
+<text text-anchor="start" x="1216.61" y="-26.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="1169.61" y="-9.05" font-family="Helvetica,sans-Serif" font-size="12.00">body </text>
+<text text-anchor="start" x="1203.61" y="-9.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+</g>
+<!-- msg&#45;&gt;profile -->
+<g id="edge20" class="edge">
+<title>msg&#45;&gt;profile</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M1177.47,-155.29C1125.68,-229.56 1051.37,-346.62 1010.28,-459.25 986.55,-524.29 972.98,-600.48 965.26,-662.58"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="962.44,-662.58 964.26,-670.86 968,-663.25 962.44,-662.58"/>
 </g>
 </g>
 </svg>
index f5f5eb38055a558e098501d1906c5884930a373e..8561818cb59055fe2cc258b9e1f07dfc24d21b42 100644 (file)
@@ -5,3 +5,4 @@ id,version,created,notes
 4,0.0.3,2021-05-24,general cleanup
 5,0.0.4,2021-06-17,"add custom foods tables (custom_foods, cf_dat)"
 6,0.0.5,2022-07-11,remove biometrics
+7,0.0.6,2022-07-14,"rename tables, start to organize for plugins"
index ef7e773edb3c7ba062ce0b0d468cf7d1bbdca268..de48195921c5b14472bee6bb65abc2a424e10baa 100644 (file)
@@ -13,6 +13,7 @@
 --
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <https://www.gnu.org/licenses/>.
+--
 CREATE TABLE `version` (
   id integer PRIMARY KEY AUTOINCREMENT,
   `version` text NOT NULL UNIQUE,
@@ -24,15 +25,15 @@ CREATE TABLE `version` (
 -- TODO: enforce FK constraint across two DBs?
 --
 ---------------------------------
--- Equations
+-- Formula / Equation
 ---------------------------------
 CREATE TABLE bmr_eq (
-  id integer PRIMARY KEY AUTOINCREMENT,
+  id integer PRIMARY KEY,
   name text NOT NULL UNIQUE
 );
 
 CREATE TABLE bf_eq (
-  id integer PRIMARY KEY AUTOINCREMENT,
+  id integer PRIMARY KEY,
   name text NOT NULL UNIQUE
 );
 
@@ -40,15 +41,17 @@ CREATE TABLE bf_eq (
 --------------------------------
 -- Profile table
 --------------------------------
--- TODO: active profile? Decide what belongs here, vs. in prefs.json (if at all)
+-- TODO: active profile?
+--  Decide what belongs here vs. in "prefs.json" (where to maintain xyz the easiest, if at all?)
 CREATE TABLE profile (
   id integer PRIMARY KEY AUTOINCREMENT,
+  uuid int NOT NULL DEFAULT (RANDOM()),
   name text NOT NULL UNIQUE,
   gender text,
   dob date,
   act_lvl int DEFAULT 2, -- [1, 2, 3, 4, 5]
   goal_wt real,
-  goal_bf real,
+  goal_bf real DEFAULT 18,
   bmr_eq_id int DEFAULT 1,
   bf_eq_id int DEFAULT 1,
   created int DEFAULT (strftime ('%s', 'now')),
@@ -56,46 +59,74 @@ CREATE TABLE profile (
   FOREIGN KEY (bf_eq_id) REFERENCES bf_eq (id) ON UPDATE CASCADE ON DELETE CASCADE
 );
 
+-- TODO: how much of this belongs in plugins/extensions?
+--  Do we want to support everything in SQL, or provide a more basic setup and
+--  encourage community-driven CSV/zip plugins?
 --
 --------------------------------
--- Recipe
+-- Custom RDA values
 --------------------------------
-CREATE TABLE recipe (
+CREATE TABLE rda (
+  profile_id int NOT NULL,
+  nutr_id int NOT NULL,
+  rda real NOT NULL,
+  PRIMARY KEY (profile_id, nutr_id),
+  FOREIGN KEY (profile_id) REFERENCES profile (id) ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+-- TODO: do we want GUID / UUID values on any of these?
+--  Does that simplify potential CSV imports? Having a GUID / UUID column?
+--
+--------------------------------
+-- Custom food
+--------------------------------
+CREATE TABLE custom_food (
   id integer PRIMARY KEY AUTOINCREMENT,
   tagname text NOT NULL UNIQUE,
   name text NOT NULL UNIQUE,
   created int DEFAULT (strftime ('%s', 'now'))
 );
 
-CREATE TABLE recipe_dat (
-  recipe_id int NOT NULL,
-  food_id int NOT NULL,
-  grams real NOT NULL,
+CREATE TABLE cf_dat (
+  cf_id int NOT NULL,
+  nutr_id int NOT NULL, -- NOTE: no FK constraining on USDA
+  nutr_val real NOT NULL,
   notes text,
   created int DEFAULT (strftime ('%s', 'now')),
-  PRIMARY KEY (recipe_id, food_id),
-  FOREIGN KEY (recipe_id) REFERENCES recipe (id) ON UPDATE CASCADE ON DELETE CASCADE
+  PRIMARY KEY (cf_id, nutr_id),
+  FOREIGN KEY (cf_id) REFERENCES custom_food (id) ON UPDATE CASCADE ON DELETE CASCADE
 );
 
 --
 --------------------------------
--- Custom foods
+-- Recipe
 --------------------------------
-CREATE TABLE custom_food (
+CREATE TABLE recipe (
   id integer PRIMARY KEY AUTOINCREMENT,
   tagname text NOT NULL UNIQUE,
   name text NOT NULL UNIQUE,
   created int DEFAULT (strftime ('%s', 'now'))
 );
 
-CREATE TABLE cf_dat (
-  cf_id int NOT NULL,
-  nutr_id int NOT NULL, -- no FK constraining on usda :[
-  nutr_val real NOT NULL,
+CREATE TABLE recipe_dat (
+  recipe_id int NOT NULL,
+  food_id int NOT NULL,
+  grams real NOT NULL,
   notes text,
   created int DEFAULT (strftime ('%s', 'now')),
-  PRIMARY KEY (cf_id, nutr_id),
-  FOREIGN KEY (cf_id) REFERENCES custom_food (id) ON UPDATE CASCADE ON DELETE CASCADE
+  PRIMARY KEY (recipe_id, food_id),
+  FOREIGN KEY (recipe_id) REFERENCES recipe (id) ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+CREATE TABLE recipe_dat_cf (
+  recipe_id int NOT NULL,
+  custom_food_id int NOT NULL,
+  grams real NOT NULL,
+  notes text,
+  created int DEFAULT (strftime ('%s', 'now')),
+  PRIMARY KEY (recipe_id, custom_food_id),
+  FOREIGN KEY (recipe_id) REFERENCES recipe (id) ON UPDATE CASCADE ON DELETE CASCADE,
+  FOREIGN KEY (custom_food_id) REFERENCES cf (id) ON UPDATE CASCADE ON DELETE CASCADE
 );
 
 --
@@ -108,13 +139,25 @@ CREATE TABLE meal_name (
   name text NOT NULL
 );
 
-CREATE TABLE food_log (
+CREATE TABLE log_food (
   id integer PRIMARY KEY AUTOINCREMENT,
   profile_id int NOT NULL,
   date int DEFAULT (strftime ('%s', 'now')),
   meal_id int NOT NULL,
-  -- NOTE: do we want separate tables for logging `food_id` vs. `custom_food_id`?
-  food_id int,
+  food_id int NOT NULL,
+  msre_id int NOT NULL,
+  amt real NOT NULL,
+  created int DEFAULT (strftime ('%s', 'now')),
+  FOREIGN KEY (profile_id) REFERENCES profile (id) ON UPDATE CASCADE ON DELETE CASCADE,
+  FOREIGN KEY (meal_id) REFERENCES meal_name (id) ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+CREATE TABLE log_cf (
+  id integer PRIMARY KEY AUTOINCREMENT,
+  profile_id int NOT NULL,
+  date int DEFAULT (strftime ('%s', 'now')),
+  meal_id int NOT NULL,
+  food_id int NOT NULL,
   custom_food_id int,
   msre_id int NOT NULL,
   amt real NOT NULL,
@@ -125,7 +168,7 @@ CREATE TABLE food_log (
 );
 
 -- TODO: support msre_id for recipe
-CREATE TABLE recipe_log (
+CREATE TABLE log_recipe (
   id integer PRIMARY KEY AUTOINCREMENT,
   profile_id int NOT NULL,
   date int DEFAULT (strftime ('%s', 'now')),
@@ -138,32 +181,23 @@ CREATE TABLE recipe_log (
   FOREIGN KEY (recipe_id) REFERENCES recipe (id) ON UPDATE CASCADE ON DELETE CASCADE
 );
 
--- TODO: CREATE TABLE custom_food_log ( ... );
 --
 --------------------------------
--- Custom RDAs
+-- Food cost
 --------------------------------
-CREATE TABLE rda (
+CREATE TABLE cost_food (
+  food_id int NOT NULL,
   profile_id int NOT NULL,
-  nutr_id int NOT NULL,
-  rda real NOT NULL,
-  PRIMARY KEY (profile_id, nutr_id),
+  cost real NOT NULL,
+  PRIMARY KEY (food_id, profile_id),
   FOREIGN KEY (profile_id) REFERENCES profile (id) ON UPDATE CASCADE ON DELETE CASCADE
 );
 
---
---------------------------------
--- Food costs
---------------------------------
--- Case for no FK?  e.g. points to food OR custom_food?
--- Leave edge cases potentially dangling (should never happen)
--- Does this simplify imports with a potential `guid` column?
-CREATE TABLE food_cost (
-  food_id int,
-  custom_food_id int,
+CREATE TABLE cost_cf (
+  custom_food_id int NOT NULL,
   profile_id int NOT NULL,
   cost real NOT NULL,
-  PRIMARY KEY (food_id, custom_food_id, profile_id),
+  PRIMARY KEY (custom_food_id, profile_id),
   FOREIGN KEY (custom_food_id) REFERENCES custom_food (id) ON UPDATE CASCADE ON DELETE CASCADE,
   FOREIGN KEY (profile_id) REFERENCES profile (id) ON UPDATE CASCADE ON DELETE CASCADE
 );