Skip to content

Update drizzle-orm and drizzle-kit in with-drizzle templates#263

Merged
birkskyum merged 1 commit into
solidjs:mainfrom
brenelz:update-drizzle
Jul 18, 2026
Merged

Update drizzle-orm and drizzle-kit in with-drizzle templates#263
birkskyum merged 1 commit into
solidjs:mainfrom
brenelz:update-drizzle

Conversation

@brenelz

@brenelz brenelz commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Fixes solidjs/solid-start#1917 (the with-drizzle example now lives in this repo).

Changes

Applied to both solid-start-v1/with-drizzle and solid-start-v2/with-drizzle:

  • Bump drizzle-kit ^0.22.7^0.31.10 and drizzle-orm ^0.31.2^0.45.2 (versions from June 2024 → current), and regenerate the lockfiles.
  • Modernize drizzle.config.ts to use defineConfig from drizzle-kit and drop the stale commented-out driver option.
  • Regenerate the bundled drizzle/db.sqlite from the schema. The old binary was created by drizzle-kit 0.22 with drifted DDL (id integer PRIMARY KEY DEFAULT 0 vs no default in schema.ts), which made drizzle-kit push on current drizzle-kit detect a table recreation and fail with SqliteError: index users_id_unique already exists. With the regenerated db, push is a clean no-op.

v1-only fix found while verifying:

  • src/api/server.ts imported useSession from @solidjs/start/http, which is a v2-only entry point — the v1 template failed at runtime with Missing "./http" specifier in "@solidjs/start" package (looks like it was synced from the v2 template in reintegrate SolidStart v1 #254). Restored the v1 import from vinxi/http.

Verification

For each template: pnpm install, pnpm exec drizzle-kit push (idempotent on second run), started the dev server, and exercised register → logout → login in a browser — the full drizzle insert/select flow works on drizzle-orm 0.45.2.

🤖 Generated with Claude Code

- Bump drizzle-kit ^0.22.7 -> ^0.31.10 and drizzle-orm ^0.31.2 -> ^0.45.2
  in both solid-start-v1 and solid-start-v2 with-drizzle templates
  (fixes solidjs/solid-start#1917)
- Use drizzle-kit's defineConfig in drizzle.config.ts and drop the stale
  commented driver option
- Regenerate the bundled dev db.sqlite from the schema; the old binary was
  created by drizzle-kit 0.22 with drifted DDL (id DEFAULT 0), which made
  `drizzle-kit push` on current drizzle-kit fail with
  "index users_id_unique already exists"
- Fix the v1 template's useSession import: @solidjs/start/http is a v2-only
  entry point, so the v1 template failed at runtime with
  'Missing "./http" specifier'; v1 uses vinxi/http

Both templates verified: drizzle-kit push (idempotent on second run),
dev server boots, and the register/logout/login flow works end to end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@birkskyum
birkskyum merged commit fb33877 into solidjs:main Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(examples): with-drizzle using older drizzle-orm and drizzle-kit packages

2 participants