Skip to content

Commit

Permalink
Doc update for new db migration
Browse files Browse the repository at this point in the history
  • Loading branch information
gregv committed Dec 22, 2023
1 parent d2e6211 commit 736cc99
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,25 @@ To run this application locally:
3. Run `npm i`, and then `npm run setup` to perform initial setup
4. Start a dev server using `npm run dev`

## If there is a database schema update

If you're getting an error that looks like this:

```
Invalid `prisma.user.findFirst()` invocation:
The column `main.User.mailingList` does not exist in the current database.
```

There's a new DB update and you'll need to trigger a Prisma schema update via
`prisma migrate deploy`. This looks at `prisma/migrations` and will update your
local database.

## Add a new admin user

To do this, it's easiest to use Prisma studio, which gives you access to the sqlite database through a web UI.
To do this, it's easiest to use Prisma studio, which gives you access to the
sqlite database through a web UI.

1. `npx prisma studio`
2. Head over to http://localhost:5555/
Expand Down

0 comments on commit 736cc99

Please sign in to comment.