You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, love Xata! We want to adapt it into our full code base and it works for everything except for PayloadCMS. I've left comments on relevant PayloadCMS issues.
After creating a new Postgres-enabled database and storing the DATABASE_URI with fresh API key, I try and spin up a new payload (beta) app. 2 things then happen:
Error 1: Resolved by allowing Xata to make the necessary table changes by following the Xata UI
⨯ Internal error: error: unknown statement [<nil>] on regular level, see https://xata.io/sql-support for the support matrix
at /root/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DrizzleORMPgClient.query (/root/node_modules/drizzle-kit/payload.js:34498:21)
at async apply (/root/node_modules/drizzle-kit/payload.js:36648:9)
at async pushDevSchema (../../node_modules/@payloadcms/db-postgres/dist/utilities/pushDevSchema.js:47:5)
at async Object.connect (../../node_modules/@payloadcms/db-postgres/dist/connect.js:84:5)
at async BasePayload.init (../../node_modules/payload/dist/index.js:215:13)
Error 2: Unresolved
⨯ Internal error: error: type "serial" does not exist
at /root/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DrizzleORMPgClient.query (/root/node_modules/drizzle-kit/payload.js:34498:21)
at async apply (/root/node_modules/drizzle-kit/payload.js:36648:9)
at async pushDevSchema (../../node_modules/@payloadcms/db-postgres/dist/utilities/pushDevSchema.js:47:5)
at async Object.connect (../../node_modules/@payloadcms/db-postgres/dist/connect.js:84:5)
at async BasePayload.init (../../node_modules/payload/dist/index.js:215:13)
I'm guessing its a version / pg flavour mismatch but I don't know
To Reproduce
Create a postgres-enabled Xata database and copy the API key-populated Database URI
Install beta Payload app: npx create-payload-app@beta and paste the URI into the terminal when prompted
Run the app
In the Xata UI, you should see an option pop up (in the schema panel or individual tables) to allow Xata to make the necessary changes
Bug 2 should appear in the terminal
Expected behavior
I should be able to use Xata Postgres for my PayloadCMS database
I'm following up enquiries with Payload too. Since both Xata and Payload features right now are in beta, I know its a longshot but you lot seem like wizards so thought I'd ask
The text was updated successfully, but these errors were encountered:
I'm going to close this issue as it's fixed, thanks for the bump.
PayloadCMS uses drizzle behind the scenes for Postgres connection, we worked with Drizzle and they fixed the problem with serial types in their codebase.
@karranx Are you using Drizzle by any chance, wave you updated to a recent version?
Describe the bug
First off, love Xata! We want to adapt it into our full code base and it works for everything except for PayloadCMS. I've left comments on relevant PayloadCMS issues.
After creating a new Postgres-enabled database and storing the DATABASE_URI with fresh API key, I try and spin up a new payload (beta) app. 2 things then happen:
I'm guessing its a version / pg flavour mismatch but I don't know
To Reproduce
npx create-payload-app@beta
and paste the URI into the terminal when promptedExpected behavior
I should be able to use Xata Postgres for my PayloadCMS database
Software version
Additional context
I'm following up enquiries with Payload too. Since both Xata and Payload features right now are in beta, I know its a longshot but you lot seem like wizards so thought I'd ask
The text was updated successfully, but these errors were encountered: