Skip to content

Postgres migrations broken in beta 115 #8757

@Thijmen

Description

@Thijmen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions