From b8e50316693fd43b987d10efe3448ffe5d2af082 Mon Sep 17 00:00:00 2001 From: Chi Cong Tran Date: Tue, 15 Jul 2025 09:48:29 +0200 Subject: [PATCH] document DB initialization script --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index b5b2950..f17397c 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,24 @@ npm run build You can preview the production build with `npm run preview`. > To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. + +## Initializing the SQLite DB + +A database initialization script `init_db.js` in included in the `src/init` folder. It will create a users database (if not existing) and populate it with a default admin user. Additionally, an empty cases table will be created. + +It can be run with `node init_db.js` + +Database schema: + +Users + +- id +- name +- pw + +Cases + +- id +- token +- name +- pw