-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(starters): improve drizzle integration #7288
Conversation
🦋 Changeset detectedLatest commit: 4f5a393 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
@wmertens |
Thanks @sreeisalso , that's because you didn't change anything about Qwik core in this PR. |
need to test, everythig is ready , for testing qwik-cli has to re build |
Can you add a comment with a screenshot about the working starter with Drizzle please? |
@gioboa changes not reflecting because qwik cli is not rebuilt?
|
Yep, you need to use |
@gioboa tried given link also, but the result is same as previous screen shot, |
Let me check. |
You can run |
@sreeisalso do you need help to test it? |
I will try today once back to system |
I'm getting following error while building ⚛️ supabase-auth-helpers-qwik
packages/docs/src/repl/worker/repl-dependencies.ts:51:3 - error TS2740: Type '{ isServer: true; isBrowser: false; isDev: false; }' is missing the following properties from type 'typeof import("/home/sreeisalso/workspace/github/qwik/packages/qwik/dist/core")': getLocale, useServerData, withLocale, $, and 86 more.
51 self.qwikBuild = {
~~~~~~~~~~~~~~
Found 1 error in packages/docs/src/repl/worker/repl-dependencies.ts:51
❌ Error: Command failed with exit code 2: tsc -p packages/docs/tsconfig.json
at makeError (file:///home/sreeisalso/workspace/github/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///home/sreeisalso/workspace/github/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async tscDocs (/home/sreeisalso/workspace/github/qwik/scripts/tsc-docs.ts:8:18)
at async build (/home/sreeisalso/workspace/github/qwik/scripts/build.ts:147:7)
Error: Error: Command failed with exit code 2: tsc -p packages/docs/tsconfig.json
at makeError (file:///home/sreeisalso/workspace/github/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///home/sreeisalso/workspace/github/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async tscDocs (/home/sreeisalso/workspace/github/qwik/scripts/tsc-docs.ts:8:18)
at async build (/home/sreeisalso/workspace/github/qwik/scripts/build.ts:147:7)
at panic (/home/sreeisalso/workspace/github/qwik/scripts/util.ts:287:33)
at build (/home/sreeisalso/workspace/github/qwik/scripts/build.ts:192:5)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
ELIFECYCLE Command failed with exit code 1. |
tried pnpm build.core
pnpm link.dist
for test
pnpm link -g @builder.io/qwik
pnpm i after this it is working, please find the below logs pnpm qwik add drizzle
> my-qwik-empty-starter@ qwik /home/sreeisalso/workspace/tmp/qwik-app
> qwik "add" "drizzle"
............
.::: :--------:.
.:::: .:-------:.
.:::::. .:-------.
::::::. .:------.
::::::. :-----:
::::::. .:-----.
:::::::. .-----.
::::::::.. ---:.
.:::::::::. :-:.
..::::::::::::
...::::
┌ 🦋 Add Integration drizzle
│
◇ 👻 Ready? Add drizzle to your app?
│
│ 🐬 Modify
│ - package.json
│
│ 🌟 Create
│ - drizzle.config.ts
│ - drizzle/schema.ts
│ - drizzle/migrations/.gitkeep
│ - drizzle/db/.gitkeep
│ - src/routes/users/index.tsx
│ - src/routes/users/[userId]/index.tsx
│ - src/routes/create/index.tsx
│
│ 💾 Install pnpm dependencies:
│ - @types/better-sqlite3 ^7.6.12
│ - drizzle-kit ^0.30.3
│ - better-sqlite3 ^11.8.1
│ - drizzle-orm ^0.39.0
│
│ 📜 New pnpm scripts:
│ - pnpm drizzle:generate
│ - pnpm drizzle:migrate
│ - pnpm drizzle:push
│ - pnpm drizzle:pull
│ - pnpm drizzle:check
│ - pnpm drizzle:up
│ - pnpm drizzle:studio
│ - pnpm postinstall
│
◆ Ready to apply the drizzle updates to your app?
│ ● Yes looks good, finish update!
│ ○ Nope, cancel update
└
result after successfull addition ◇ App updated
│
◇ New scripts added ───────╮
│ │
│ - pnpm drizzle:generate │
│ - pnpm drizzle:migrate │
│ - pnpm drizzle:push │
│ - pnpm drizzle:pull │
│ - pnpm drizzle:check │
│ - pnpm drizzle:up │
│ - pnpm drizzle:studio │
│ - pnpm postinstall │
│ │
├───────────────────────────╯
│
◇ 🟣 Next Steps ──────────────────────────────────────────────────────────────────────────╮
│ │
│ Drizzle was installed with a simple DB schema and some demo routes, │
│ │
│ better-sqlite3 was configured by default, but in production │
│ you'll want to use Postgres or MySQL. │
│ │
│ │
│ Drizzle studio was also added which you can access by running `npm run drizzle:studio`, │
│ │
│ Check out the Drizzle docs for more info: │
│ - https://orm.drizzle.team/docs/overview │
│ │
├────────────────────────────────────────────────────────────────────────────────────────────╯
│
└ 🦄 Success! Added drizzle to your app package.json file screenshot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉 that's great 👏
Let me try it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR @sreeisalso Thanks 🥳
What is it?
Description
Updated to latest drizzle and better-sqlite3
Checklist
pnpm change