From: Shane Jaroch Date: Thu, 6 Aug 2020 13:32:00 +0000 (-0400) Subject: update readme X-Git-Tag: 0.0.2~1 X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=c8edebfa57615fe3e2af1af78ea26dac0b90ddfb;p=nutratech%2Fusda-sqlite.git update readme --- diff --git a/README.rst b/README.rst index 90e23d5..b2aaef4 100644 --- a/README.rst +++ b/README.rst @@ -22,23 +22,47 @@ Building the database bash setup.sh python3 process.py -3. Create the database with +3. If you are committing changes, add a line to :code:`nt_ver.csv``, e.g. :code:`id=3` is new + ++-----+----------+-----------------------------------+ +| id | version | created | ++=====+==========+===================================+ +| 1 | 0.0.0 | Wed 05 Aug 2020 07:09:35 PM EDT | ++-----+----------+-----------------------------------+ +| 2 | 0.0.1 | Wed 05 Aug 2020 08:14:52 PM EDT | ++-----+----------+-----------------------------------+ +| 3 | 0.0.2 | Thu 06 Aug 2020 09:21:39 AM EDT | ++-----+----------+-----------------------------------+ + +4. Create the database with .. code-block:: bash cd ../sql sqlite3 nutra.db -NOTE: FOLLOW STEP 4 FROM INSIDE THE SQL SHELL +NOTE: FOLLOW STEP 5 FROM INSIDE THE SQL SHELL -4. Create the tables, import the data, and save: +5. Create the tables, import the data, and save: -.. code-block:: bash +.. code-block:: sql .read tables.sql .read import.sql .exit +6. Verify the tables, again inside :code:`sqlite nutra.db`, + +.. code-block:: sql + + .tables + SELECT * FROM nutr_def WHERE id=328; + SELECT long_desc FROM food_des WHERE id=9050; + SELECT * FROM nt_ver; + .exit + +7. If everything looks good, compress into :code:`nutra-X.X.X.db.tar.xz` and upload to binary host. + Tables (Relational Design) ##########################