Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gamesguru committed Apr 18, 2024
1 parent 905b3a2 commit ef9a059
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ See CLI: https://github.com/nutratech/cli
See nt-sqlite: https://github.com/nutratech/nt-sqlite



Building the database
#########################

Expand All @@ -30,6 +31,7 @@ Building the database
bash setup.sh
python3 process.py
3. If you are committing database changes, add a line to
:code:`sql/version.csv` (e.g. :code:`id=3` is the latest in this case).

Expand All @@ -43,32 +45,28 @@ Building the database
| 3 | 0.0.2 | Thu 06 Aug 2020 09:21:39 AM EDT |
+-----+----------+-----------------------------------+

4. i. (Optional) Enforce foreign keys with your ``~/.sqliterc`` file,

4. i. *(Optional)* Enforce FKs by copying this to your ``~/.sqliterc`` file.

.. code-block:: text
.headers on
.mode column
PRAGMA foreign_keys = 1;
4. ii. Create the database with
4. ii. Create the database.

.. code-block:: bash
make build
5. Verify the tables (inside an SQL shell: :code:`sqlite3 sql/usda.sqlite3`),
5. Verify the tables.

.. code-block:: sql
.tables
make test
SELECT * FROM nutr_def WHERE id=328;
SELECT long_desc FROM food_des WHERE id=9050;
SELECT * FROM version;
.exit
6. If everything looks good, upload compressed
:code:`dist/nutra-X.X.X.db.tar.xz` file to binary host.
Expand All @@ -78,6 +76,7 @@ Building the database
make deploy/upload
Tables (Relational Design)
##########################

Expand Down

0 comments on commit ef9a059

Please sign in to comment.