Skip to content

Commit 82f4517

Browse files
docs: update README with DB seeding step (#64)
* docs: update README with database seeding instructions * docs: correct spacing in README for Drizzle Studio reference * feat: add db:seed command and update README with usage examples
1 parent e1efac7 commit 82f4517

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ bun sdk:build
110110
bun run dev
111111
```
112112

113+
8. Seed the database with sample data (optional):
114+
115+
```bash
116+
bun db:seed <WEBSITE_ID> [DOMAIN] [EVENT_COUNT]
117+
```
118+
119+
**Examples:**
120+
121+
```bash
122+
bun db:seed g0zlgMtBaXzIP1EGY2ieG onlybuddies.com 10000
123+
bun db:seed d7zlgMtBaSzIL1EGR2ieR notmybuddy.cc 5000
124+
```
125+
126+
**Note:** You can find your website ID in your website overview settings.
127+
113128
## 💻 Development
114129

115130
### Available Scripts

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"db:push": "dotenv -- turbo run db:push",
1616
"db:migrate": "dotenv -- turbo run db:migrate",
1717
"db:deploy": "dotenv -- turbo run db:deploy",
18+
"db:seed": "dotenv -- sh -c 'cd packages/db && bun run db:seed \"$@\"' --",
1819
"email:dev": "cd packages/email && bun run dev",
1920
"sdk:build": "cd packages/sdk && bun run build",
2021
"dashboard:dev": "dotenv -- cd apps/dashboard; bun run dev"

packages/db/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"db:studio": "drizzle-kit studio",
2929
"db:migrate": "drizzle-kit generate && tsx src/migrate.ts",
3030
"db:deploy": "tsx src/migrate.ts",
31+
"db:seed": "tsx src/seed.ts",
3132
"clickhouse:init": "tsx src/clickhouse/setup.ts"
3233
}
3334
}

0 commit comments

Comments
 (0)