f034_sqlite_database #19
21
README.md
21
README.md
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user