Xata

X

Xata

This is Xata's community Discord server, where we discuss all things Xata: projects, features, dreams!

Join

help

general

Error: Option apiKey is required in Remix loader

Hello, I've been trying to query from Xata in a Remix loader, and am getting this error. ``` Error: Option apiKey is required at XataClient.parseOptions_fn...

Query execution issue with CTE in xata.sql

I am trying to exceute a query in xata.sql but it thorws an error where I try to use a CTE. CTE as a general works but whe, for example if I try to use select * for ProductMaxDiscount ; it is working. But if I use an alias for the cte and refer them in select or try to join with other, I get table not found error. I tried the query in other postgres env, it is working fine. Below is the query I want to execute. And below that I'll attach the ddl for quick start for testing. ...

XATA > N8N suddenly throwing: this endpoint works only with non postgres enabled branches

Everything on my other workflows is working fine exactly the same set up. NOW on a new workflow (same structure) I am getting this error. Frustrating...
No description

Unable to create text field with unique constraint from UI

Earlier there was a string field which can be added with unique constraints from checkbox, but now after the text field I don't see the checkbox there. Was that removed intentionally ? How can I add unique constraints now If I want to ?...
No description

"now" as default value for timestamp not working

When adding a new timestamp column in the xata web ui (using xata with postgres enabled), if you set the default value to be now, it sets the default value to the time at which you created the column instead of being the time when a new row is created.
No description

Prisma changes not being applied to database on specific fields.

I'm trying to build an admin dashboard/client support ticket page. I have a clients table which has "avatarUrl" and "imageId" fields as well as other random information needed for the site. All other fields can be updated with no problems, but for some reason the avatarUrl and imageId simply refuse to be updated. I can update these fields through the Prisma Studio, but no changes can be made through the
await prisma.client.update
await prisma.client.update
query works. I have ensured that the ID matches, and the updated information is valid, but no changes are ever made. Running ```javascript const res1 = await prisma.client.update({...

identityName.startsWith is not a function

I get this error whenever I push or introspect, I'm using drizzle + postgres. https://github.com/drizzle-team/drizzle-orm/issues/2919...

Error when trying to apply schema.json after I just dumped it

I'm trying to make schema changes in the schema.json file. I did xata schema dump -f schema.json to create the schema file and tried making edits. When I go to apply the changes using xata schema upload schema.json I get the error Error: invalid key [checkConstraints] in request Even if I don't make any changes and just try reapplying the schema file I just dumped. Using Xata with Postgres enabled Xata CLI version: @xata.io/cli/0.0.0-next.v403cdd55cb26b69c074dbc07b44daa0c2a0a77b6 win32-x64 node-v20.5.0...

ERROR: permission denied for schema public

Hey! I was trying to deploy an Elixir - Phoenix application (Xata Direct Connection Beta) and I'm getting an error when running migrations. I'm using the Oban job library and it has a migration to setup the job table which runs the following SQL: ```sql DO $$ BEGIN...

Incorrect DB branch name on Vercel previews for Renovate branches

Hi folks, I've noticed in the last few days that for branches like renovate/lock-file-maintenance I'm getting build errors on Vercel like database branch [REPO:preview-USER-renovate] not found. Has something changed recently or am I doing something incorrectly? I'm guessing the branch name should be REPO:preview-USER-renovate-lock-file-maintenance and that something is going wrong in the construction of the DB branch name due to the /.

Plans to support Railway for PR based workflows?

Would be great to have env variables injected on automatic Github PR deployments that Railway creates. https://docs.railway.app/guides/github-autodeploys Is this on the roadmap?...

A problem with Drizzle and Auth.js

Hey I try to use Auth.js together with Drizzle and as the DB Xata.io. I set everything up and then just copied the Drizzle Schema from the official Auth.js site (https://authjs.dev/getting-started/adapters/drizzle) . When I try to do push it to the DB (npx drizzle-kit push) I get the following error: error: relation "public.user" does not exist { length: 349,...

⨯ FetcherError: dbname: invalid branch name when using client@next ts sdk

Hi, I'm trying to use Xata with postgres enabled via the @next ts sdk. Firstly, the client generation seems broken, as mentioned in my previous post. But secondly, when I try and make a request I'm getting: ⨯ FetcherError: mydbname: invalid branch name ...

Xata internal postgres fields - can I rely on them?

Hi, I'm just trying to get started with Xata (with postgres enabled). I chose to use prisma to manage the database schema and db migrations and the xata ts client/sdk for accessing the db. All was going well and I decided to try and set up CI/CD properly, which included checking the xata files out of git and regenerating the client (using a prisma schema as source of truth) in the CI/CD pipeline....

Problems setting up Drizzle ORM with HTTP client via client/cli@ne

Hi, I'm having some trouble setting up the drizzle ORM with http client. In particular following https://xata.io/docs/integrations/drizzle, I'm running yarn add @xata.io/client@next...

What is good practice with Xata's (Multi-version Schema) Migrations?

For now, we have used mainly Drizzle Kit for our migration needs. However, we are at a point where we would like to use Xata's Multi-Version schema feature. What's a good workflow that allows for good DX and safe migrations? With "normal" Xata migrations, every single schema change is a migration and results in its own file. This is suboptimal DX since during development you may have to add a field, rename it and delete it again until you have found the best schema for a feature and have many files in the end that are difficult to review....

Queries in the dashboard issue

Hi, I've been running some queries on the dashboard, but there are errors parsing nested relationships. It looks like this is an issue with the ReactJson component being used in the front-end. The error displayed is "Failed to parse link for field"
No description

What is the general SDLC when using Xata?

We are starting a new project utilizing Xata. I am not understanding the ways to build out our data structure. Can this be done and maintained in code, or is all the data structure configured in the Xata.io UI? At this point we are looking to use Xata natively and not with an ORM like Drizzle....

When are connections to the cluster available during the moving of a branch?

For several minutes the branches are moving to a newly provisioned cluster. When are new connections to the branch made to the cluster?

Hosting services for the .Net Core Web Application

I want to use Xata Serverless Postgres in a .Net Core Application in the US East (N. Virginia) region. Which hosting services for the .Net Core Web application do you recommend considering low latency between the database and the application and also cost-effectiveness?...