document DB initialization script

This commit is contained in:
2025-07-15 09:48:29 +02:00
parent 51d3f19f3e
commit b8e5031669

View File

@@ -36,3 +36,24 @@ npm run build
You can preview the production build with `npm run preview`. 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. > 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