Skip to content

Commit 7d3fa5f

Browse files
committedApr 13, 2024
add drop db script
1 parent 93aa170 commit 7d3fa5f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ When running tests we isolate the database between each test run by actually cre
117117

118118
If you wish to drop the development database you can execute:
119119
```
120-
docker exec boxel-pg dropdb -U postgres -w boxel
120+
pnpm drop-db
121121
```
122122

123-
You can then run `pnpm migrate up` to create the database again.
123+
You can then run `pnpm migrate up` or start the realm server to create the database again.
124124

125125
#### DB Migrations
126126
When the realm server starts up it will automatically run DB migrations that live in the `packages/realm-server/migrations` folder. As part of development you may wish to run migrations manually as well as to create a new migration.

‎packages/realm-server/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@
9797
"lint:js:fix": "eslint . --fix",
9898
"lint:glint": "glint",
9999
"migrate": "PGDATABASE=boxel ./scripts/ensure-db-exists.sh && PGPORT=5435 PGDATABASE=boxel PGUSER=postgres node-pg-migrate",
100-
"make-schema": "./scripts/schema-dump.sh"
100+
"make-schema": "./scripts/schema-dump.sh",
101+
"drop-db": "docker exec boxel-pg dropdb -U postgres -w boxel"
101102
},
102103
"volta": {
103104
"extends": "../../package.json"

0 commit comments

Comments
 (0)