Skip to content
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

Postgres migrations broken in beta 115 #8757

Closed
Thijmen opened this issue Oct 17, 2024 · 6 comments
Closed

Postgres migrations broken in beta 115 #8757

Thijmen opened this issue Oct 17, 2024 · 6 comments
Labels

Comments

@Thijmen
Copy link

Thijmen commented Oct 17, 2024

Describe the Bug

After upgrading to beta 115, I am getting this error:

src/migrations/20241016_175315.ts:646:36 - error TS2345: Argument of type 'SQL<unknown>' is not assignable to parameter of type 'string | SQLWrapper'.
  Type 'SQL<unknown>' is not assignable to type 'SQLWrapper'.
    The types returned by 'getSQL()' are incompatible between these types.
      Type 'import("/..../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/drizzle-orm/sql/sql").SQL<unknown>' is not assignable to type 'import("/..../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/drizzle-orm/sql/sql").SQL<unknown>'.
        Types have separate declarations of a private property 'shouldInlineParams'.

646   await payload.db.drizzle.execute(sql`

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/blob/beta/packages/drizzle/package.json#L49

Reproduction Steps

The breaking change introduced in #8617, mentions upgrading the libsql package, which comes with drizzle >0.35. However, in the drizzle package from Payload, it is not updated.

See also Discord; https://discord.com/channels/967097582721572934/1296361666765656138

Which area(s) are affected? (Select all that apply)

db-postgres

Environment Info

Binaries:
Node: 20.12.1
npm: 10.5.0
Yarn: 1.22.22
pnpm: 8.15.6
Relevant Packages:
payload: 3.0.0-beta.115
next: 15.0.0-canary.173
@payloadcms/db-postgres: 3.0.0-beta.115
@payloadcms/email-nodemailer: 3.0.0-beta.115
@payloadcms/graphql: 3.0.0-beta.115
@payloadcms/live-preview: 3.0.0-beta.115
@payloadcms/live-preview-react: 3.0.0-beta.115
@payloadcms/next/utilities: 3.0.0-beta.115
@payloadcms/plugin-cloud: 3.0.0-beta.115
@payloadcms/plugin-cloud-storage: 3.0.0-beta.115
@payloadcms/plugin-form-builder: 3.0.0-beta.115
@payloadcms/plugin-nested-docs: 3.0.0-beta.115
@payloadcms/plugin-redirects: 3.0.0-beta.115
@payloadcms/plugin-seo: 3.0.0-beta.115
@payloadcms/richtext-lexical: 3.0.0-beta.115
@payloadcms/translations: 3.0.0-beta.115
@payloadcms/ui/shared: 3.0.0-beta.115
react: 19.0.0-rc-3edc000d-20240926
react-dom: 19.0.0-rc-3edc000d-20240926
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10

@Thijmen Thijmen added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Oct 17, 2024
@r1tsuu
Copy link
Member

r1tsuu commented Oct 17, 2024

Confirmed the issue, we're looking into this

@Thijmen
Copy link
Author

Thijmen commented Oct 17, 2024

Cheers @r1tsuu, appreciate the fast response and feedback! Looking forward to the fix! 🚀

@tim-the-arcane
Copy link

Patching the node_modules/@payloadcms/drizzle/package.json helped:

index 6ac1e1a446f1b205938f80eaa5014be0c32c69b5..1c379ded6e79b7b5e99b57b1597e1a360693d752 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
   ],
   "dependencies": {
     "console-table-printer": "2.11.2",
-    "drizzle-orm": "0.34.1-1f15bfd",
+    "drizzle-orm": "0.35.1",
     "prompts": "2.4.2",
     "to-snake-case": "1.0.0",
     "uuid": "9.0.0"

DanRibbens pushed a commit that referenced this issue Oct 17, 2024
Fixes #8757. Other packages
have `drizzle-orm` `0.35.1`, but this does not (`0.34.1-1f15bfd`).
@r1tsuu
Copy link
Member

r1tsuu commented Oct 17, 2024

Fixed in #8759, will be in the next release

@r1tsuu r1tsuu closed this as completed Oct 17, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Oct 17, 2024
Copy link

🚀 This is included in version v3.0.0-beta.116

Copy link

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants