-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update src/README with instructions on using sqlite #161
Changes from 2 commits
5285498
2a09f4b
8250f0d
4c51abb
60b3e23
9704d70
3eac92a
c091c3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,26 @@ Follow these directions for easier database editing. | |
- `npx prisma db push` | ||
- Run the application and confirm it works | ||
|
||
# Prisma SQLite | ||
|
||
- Update the schema.prisma file to use the following provider | ||
|
||
`provider = "sqlite"` | ||
|
||
- Update the env file to specify the database file | ||
|
||
`DATABASE_URL="file:./db.sqlite"` | ||
|
||
- Run the following command to update the database | ||
|
||
```bash | ||
npx prisma db push | ||
``` | ||
|
||
> **_NOTE:_** SQLite is a [cross-platform](https://en.wikipedia.org/wiki/Cross-platform_software) database management system that provides a highly reliable, fast, and lightweight SQL database engine for everyone to use for any purpose. | ||
> | ||
>Learn more of why someone would want to use this free & open source library here: [When to use SQLite?](https://www.sqlite.org/whentouse.html) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The benefit to using SQLite is that it may be an easier alternative to stand up to SQL Server if someone is trying to run the project locally. A caveat is the demographic questions won't load because those are hard coded in the SQL migrations. Add something like the following below the title: MotivationSQLite is a light-weight alternative to Microsoft SQL Server which may be easier to stand up if you're running the project locally. Note: The demographic questions will not populate because they are hard-coded in the SQL migrations. |
||
|
||
# Working with prisma | ||
|
||
When the data model changes, run the following to update your local database with the latest migrations | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a note on why someone would want to use SQLite?