aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorZach Berwaldt <zberwaldt@tutamail.com>2024-03-18 21:27:24 -0400
committerZach Berwaldt <zberwaldt@tutamail.com>2024-03-18 21:27:24 -0400
commiteb51bdbfef8c2aacf0fdfde279a40de7f74c8d86 (patch)
treef8fdfb4e28fa271eda3027d84843e4b476831cdd /db
parent5ddcd1cf663cc732819cfcb66f2ff6b1bbeb0d47 (diff)
clean up, add better error handling
Diffstat (limited to 'db')
-rw-r--r--db/README.md10
-rw-r--r--db/scripts/init.sh6
2 files changed, 11 insertions, 5 deletions
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 @@
1# The Database 1# The Database
2 2
3This document describes how to set up the database for your instance of the water application. \ No newline at end of file 3This document describes how to set up the database for your instance of the water application.
4
5## Setup
6
7The 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:
8
9```sh
10export DB_PATH="path/to/database"
11``` \ 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 @@
1PROJECT_DIR=$(pwd) 1PROJECT_DIR=$(pwd)
2 2
3DB_PATH="$PROJECT_DIR/db/test.sqlite3" 3DB_PATH="$PROJECT_DIR/test.sqlite3"
4
5SQL_DIR="$PROJECT_DIR/db/sql"
6
7 4
5SQL_DIR="$PROJECT_DIR/sql"
8 6
9insert_user() { 7insert_user() {
10 read -p "Enter a username: " username 8 read -p "Enter a username: " username