Xata

X

Xata

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

Join

help

general

File-Type Columns no work

Since yesterday, I no longer have the option to add file-type columns in the tables. Does anyone know what could be the issue? I still have a free plan.

Links (Relationships) database structure and filter / query approach

Hi everyone, I am very new to Xata and databases generally and I am trying to build a small web app. I am using Next.js Latest, typescript. I am looking for some guidance on setup and then filtering the data, so any help would be appreciated: The situation I have is: ...
No description

REST API - Unknown Column Type

I'm looking to wire Xata to a low-code frontend (Divhunt). I'm testing using the Rest API to get a list of entries from my table. The filtering function isn't working how I think it should. I use Prisma to manage the backend of my database. The column I'm filtering on is an Enum in Prisma. ```...

Unable to get query using dynamic table

I want to retrieve data with the filter userId is this.userId. but when I do it with dynamic table name I get an error:
This expression is not callable.
Each member of the union type '{ <F extends FilterColumns<AgentRecord> | JSONFilterColumns<AgentRecord>>(column: F, value: FilterValueAtColumn<AgentRecord, F>): Query<...>; (filter?: BaseApiFilter<...> | ... 1 more ... | undefined): Query<...>; } | { ...; } | { ...; } | { ...; }' has signatures, but none of those signatures are compatible with each other.ts(2349)
This expression is not callable.
Each member of the union type '{ <F extends FilterColumns<AgentRecord> | JSONFilterColumns<AgentRecord>>(column: F, value: FilterValueAtColumn<AgentRecord, F>): Query<...>; (filter?: BaseApiFilter<...> | ... 1 more ... | undefined): Query<...>; } | { ...; } | { ...; } | { ...; }' has signatures, but none of those signatures are compatible with each other.ts(2349)
...

Sql over http unused parameters.

I need help using the typescript sdk to pull data using sql. ```ts const my_nam = 'interbro' const my_date = '2020-04-01'...

unable to execute start operation: pq: syntax error at or near ")"

I keep getting this error whenever I try to start a migration. This is my migration.json file: [ { "create_table": {...

Column is not an object or link

Hey I am trying to create an relation in my database schema. I am using Prisma ORM. Somehow this schema makes the xata.io table view break more specifically the view for Child table. It says "Error loading data... columns invalid: column [parentId]: column is not an object or link". I have done the modification thing that xata prompts me for when I first open the viewer I just have not pulled the schema to my prisma.schema as I thought it was more clear to only show the schema I wrote. What am I doing wrong?...

High severity vulnerabilities when installing @xata.io/cli

Hi all, encountered 4 high severity vulnerabilities when I installed the CLI: ``` npm install @xata.io/cli added 200 packages, changed 3 packages, and audited 1808 packages in 14s...

Had a question, is there a way to store long text

I was trying to get descriptions for my products to fit in the database but i end up hitting character limits when using "text", is there a fix for this OR will long-text support be coming soon?

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 /.