Add an auth:migrate npm script for Better Auth's own migrations

Installs @better-auth/cli as a devDependency instead of fetching it via
npx each time, and updates the README to use the new script.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-10 08:22:17 +02:00
co-authored by Claude Sonnet 5
parent cacfce8eae
commit 5059f40d4c
3 changed files with 1429 additions and 23 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ etc). A `docker-compose.yml` at the repo root starts one:
docker compose up -d # starts Postgres on localhost:5433
cp .env.example .env.local # sets DATABASE_URL to match
npm run db:migrate # applies this project's Drizzle migrations
npx @better-auth/cli migrate # applies Better Auth's own tables
npm run auth:migrate # applies Better Auth's own tables
npm run db:seed # seeds a sample Brand, menu, and Machines
npm run dev
```
@@ -72,7 +72,7 @@ Generate and set the `BETTER_AUTH_SECRET` environment variable in your
`.env.local`:
```bash
npx -y @better-auth/cli secret
npx @better-auth/cli secret
```
See the [Better Auth documentation](https://www.better-auth.com) for more on