Help with Drizzle
Hey team,
i would like to run introspect and pull commands from drizzle-kit, but i seem to be running into an error
the config:-
The error :-
Additional Information :-
Driver: pg
Beta Direct Access Enabled: false
10 Replies
Hi Oreki, I suspect the issue is due to
Beta Direct Access Enabled: false
. Without this setting enabled you can't connect directly to your database with a postgres connection string. https://xata.io/docs/postgres#postgres-can-not-be-enabled-on-already-existing-databases you could test this by creating a test db with that setting enabled and see if the connection works.Connect to Postgres
Learn how to connect to Postgres directly via the wire protocol
so if i have to export my data completely and create beta enabled database, i will have to go over one by one table by table, export to csv?
Unfortunately, there's no way currently to convert an existing database to a direct-postgres-access-enabled database.
yeah quite annoying tbh, should there not be a feature to export entire database?
I appreciate that it's annoying. We're looking into that feature for the non-pg-enabled databases. For the pg-enabled dbs, you can use pgdump.
Thank you for the quick reply tho
Let me double-check just to make sure I'm right about
Beta Direct Access Enabled: false
before you go exporting anything. Did you test it with a postgres-enabled db?actually, what i am trying to do is replicate the schema in a local database for testing purposes
it would've been quite helpful if i could just do pull on one db and push on another
but it appears, i will have to wait for xata to come out of that beta access thing for me to be able to use it in production
With your non-postgres-enabled database, you might need to change the client you're using. Looks like you're using the TCP client. Did you try the HTTP client?
https://xata.io/docs/integrations/drizzle
i need to replicate the schema only, not the whole database, only need the drizzle-kit