diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/README.md | 10 | ||||
-rw-r--r-- | db/scripts/init.sh | 6 |
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 | ||
3 | This document describes how to set up the database for your instance of the water application. \ No newline at end of file | 3 | This document describes how to set up the database for your instance of the water application. |
4 | |||
5 | ## Setup | ||
6 | |||
7 | 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: | ||
8 | |||
9 | ```sh | ||
10 | export 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 @@ | |||
1 | PROJECT_DIR=$(pwd) | 1 | PROJECT_DIR=$(pwd) |
2 | 2 | ||
3 | DB_PATH="$PROJECT_DIR/db/test.sqlite3" | 3 | DB_PATH="$PROJECT_DIR/test.sqlite3" |
4 | |||
5 | SQL_DIR="$PROJECT_DIR/db/sql" | ||
6 | |||
7 | 4 | ||
5 | SQL_DIR="$PROJECT_DIR/sql" | ||
8 | 6 | ||
9 | insert_user() { | 7 | insert_user() { |
10 | read -p "Enter a username: " username | 8 | read -p "Enter a username: " username |