Xata

X

Xata

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

Join

help

general

Vercel integration is not setting the XATA_BRANCH

errors: [ { message: 'database branch [...:preview-nativedone-chore] not found', status: 404 }...
No description

pgroll with pg-enabled db

I tried using pgroll like shown on github
pgroll init --postgres-url postgres://user:password@host:port/dbname
pgroll init --postgres-url postgres://user:password@host:port/dbname
using the url from pg enabled database but I get an error
Failed to initialize pgroll: pq: unknown statement type, see https://xata.io/sql-support for the support matrix
Error: pq: unknown statement type, see https://xata.io/sql-support for the support matrix
Failed to initialize pgroll: pq: unknown statement type, see https://xata.io/sql-support for the support matrix
Error: pq: unknown statement type, see https://xata.io/sql-support for the support matrix
...

Issues connecting to the database

I'm trying to connect to my db using the new Postgres + Prisma setup. For some reason whenever I try to push or migrate I keep getting the message `` Error: P1001: Can't reach database server at us-east-1.sql.xata.sh:5432` ...

how to show all results in react app?

im trying const response = await axios.post( 'https://alexis-gaitan-s-workspace-r0aiag.us-east-1.xata.sh/db/dbsnetworkdb:main/tables/usuarios/query', but its showing only max 1000 results, but i have like 10000...

xata raises error if `RESET ALL;` is called

I have encountered a bug with xata when using asyncpg and a connection pool. Root cause: When a connection is released back into the pool, the RESET ALL; is executed and xata raises a setting "" is not allowed error. ...

Is it possible to restrict api key to specific branch only?

I mean, to have a single API key that I can use for main branch that I can have in vercel prod env for example, and 2nd api key, that can be used for all branches, except main? So while trying to push changes, query etc. from main I will get the error?

Using prisma to create a new record with a file column

How do I use the prisma client to create a new record with an empty file column? I've tried the following: 1. Placeholder metadata (taking hints from this example: https://xata.io/docs/sdk/file-attachments#1-createupdate-a-record-with-an-empty-file-server-side) ```ts await prisma.message.create({ data: {...

Custom env variable names

Hello! I'm using a vite plugin to check for environment variables before creating a new build. Vite recommends declaring env variable names with the prefix VITE_. The plugin only detects variables with this prefix. How can I configure the xata SDK and CLI to use the env variables VITE_XATA_BRANCH and VITE_XATA_API_KEY?

schema migration to add link between users and projects tables.

Trying to run a migration in the xata migration editor. It runs without error but I cannot get the link created. When I use the interactive tool to create the link_to_table it creates a link between the tables but when i try to add a record it gives this error " columns invalid: column [user_xata_id]: column not found " [ { "alter_column": { "table": "projects",...

Cannot destructure property 'id' of 'raw' as it is null (following the Astro tut)

Howdy folks. I'm pretty new to Xata and have to say so far it's pretty dang awesome. I'm still figuring things out and have been going through the Astro, Xata, Stripe & Lucia tut (sans the stripe part). The user registration and session parts are working, but I'm getting the following error when signing up as a new user: ...

pg_dump: error: query failed: SSL SYSCALL error: EOF detected

I tried pg_dump like in the documentation https://xata.io/docs/postgres#export but got error 'pg_dump: error: query failed: SSL SYSCALL error: EOF detected', probably issue with sslmode=require. Need help!...

Database error: error parsing response from server: `S` field missing

Hello everyone, I'm trying to use Xata for an app (Umami) I'm trying to deploy to Vercel. Vercel seems to be able to connect to the database (according to logs), but then I get this error: ``` Migration name: 01_init Database error code: none Database error:...

what is the ideal column type to store the content of a Tiptap editor?

I’m building page the saves the whole document provided by the rich text editor using tiptap. I was wondering if the ideal column type would be text or json. Not sure about the the pros and cons of both when considered things like performance, amount of data it can store, compatibility with other databases like SQLite etc. My current requirement is just to query the whole document at page load and update it when the user changes the content with some debouncing....

Issues connecting to the database

Hi We are currently experiencing issues when connecting to the Postgres database on eu-central. Mainly, schema changes are not working. But we also had disconnects when reading data or rather when trying to connect to read data. ...

Xata pull issue

Im using Xata for a next.js application and with drizzle orm I chose not to use the xata client but now i don't know how can i pull schema changes without the xata client...
No description

setting "default_tablespace" is not allowed

Hello, I'm migrating my payload3 db and when restoring I get this, and a bunch of following errors, how can I fix that?

Vercel connections timeout when using a transaction

Hi We are using Drizzle together with the TCP Pool pg client. ```ts import { drizzle as drizzlePg } from 'drizzle-orm/node-postgres';...

Type mismatch: expected vector..

Hey guys, so I have a table with a vector column with dimensions of 1536. Its naturally used to store embeddings generated via openai. Im able to save embeddings to this column via the Xata client. However.. when using the .ask method of the sdk.. im getting the following error: vector search: column [embedding]: type mismatch: expected vector (An array of floats with fixed dimension)...

I'm getting the following error when creating a record on this 'vectors' table

message: 'table [vectors]: record with ID [rec_cq8rnq04vvkm2p5ohj6g] already exists in table [vectors]', even though the table is completely empty, to create the tables i used prisma, only for the regular columns (strings, numbers etc...) and then i the vector one on the UI. any help will be appreciated, Thanks!!...
No description

Preview branches are not being created for Vercel/Github extension

I don't know why. Everything worked normal a couple days ago