From 53b74ec6122c94853f9d43ab2ac1f69efab0886d Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Mon, 18 Mar 2024 21:27:24 -0400 Subject: clean up, add better error handling --- db/README.md | 10 +++++++++- db/scripts/init.sh | 6 ++---- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'db') diff --git a/db/README.md b/db/README.md index f36e555..1d5ad71 100644 --- a/db/README.md +++ b/db/README.md @@ -1,3 +1,11 @@ # The Database -This document describes how to set up the database for your instance of the water application. \ No newline at end of file +This document describes how to set up the database for your instance of the water application. + +## Setup + +The first step is to decide where you are going to keep your database. Once you have decided on where that is going to be add it to your environment: + +```sh +export DB_PATH="path/to/database" +``` \ No newline at end of file diff --git a/db/scripts/init.sh b/db/scripts/init.sh index 1a8bbde..3baec36 100644 --- a/db/scripts/init.sh +++ b/db/scripts/init.sh @@ -1,10 +1,8 @@ PROJECT_DIR=$(pwd) -DB_PATH="$PROJECT_DIR/db/test.sqlite3" - -SQL_DIR="$PROJECT_DIR/db/sql" - +DB_PATH="$PROJECT_DIR/test.sqlite3" +SQL_DIR="$PROJECT_DIR/sql" insert_user() { read -p "Enter a username: " username -- cgit v1.1