This commit is contained in:
@@ -83,6 +83,21 @@ This command starts healthy PostgreSQL and Redis containers, applies migrations,
|
||||
|
||||
The command does not provision an administrator automatically. Run `npm run provision:admin` once after setting the initial administrator variables in `.env` when admin access is needed. Stop the application processes with `Ctrl+C`; stop the containers separately with `npm run db:down` when they are no longer needed.
|
||||
|
||||
For a disposable local database reset, use:
|
||||
|
||||
```sh
|
||||
npm run db:reset
|
||||
npm run provision:admin
|
||||
```
|
||||
|
||||
Or combine both operations with:
|
||||
|
||||
```sh
|
||||
npm run db:reset:admin
|
||||
```
|
||||
|
||||
`db:reset` removes the local PostgreSQL and Redis volumes, recreates healthy containers, and synchronizes the current Drizzle schema with `drizzle-kit push --force`. It is destructive and local-development-only. It does not modify `.env`.
|
||||
|
||||
## Visual Development
|
||||
|
||||
Run Storybook to inspect the authoritative design tokens and mock visual fixtures without requiring API data:
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
"db:generate": "drizzle-kit generate",
|
||||
"db:migrate": "drizzle-kit migrate",
|
||||
"db:up": "docker compose up -d --wait postgres redis",
|
||||
"db:sync:local": "drizzle-kit push --force",
|
||||
"db:reset": "docker compose down -v && npm run db:up && npm run db:sync:local",
|
||||
"db:reset:admin": "npm run db:reset && npm run provision:admin",
|
||||
"dev": "npm run dev:prepare && concurrently --kill-others --names api,web,worker --prefix-colors blue,green,yellow \"npm run dev:api\" \"npm run dev:web\" \"npm run dev:worker\"",
|
||||
"dev:api": "npm run start --workspace=@pokemon-inventory/api",
|
||||
"dev:prepare": "npm run db:up && npm run db:migrate",
|
||||
|
||||
Reference in New Issue
Block a user