I am normally focused on Supabase for most of my app databases, and haven’t used Replit’s own DB system in months. But today thought I would check it out for a new app.
I asked the agent to build the app and add a DB. But I do not see the DB in the Database Tool.
Surely all DBs created by Replit are visible in the database tool?
When I asked the agent about this, it said the following:
Your database does exist and is working. The Replit Database tool UI is likely looking for databases created through that specific tool, but this app uses a Neon-hosted PostgreSQL database (connected via DATABASE_URL environment variable). The database exists and is actively being used by your app - it’s just not visible in that particular UI pane.
If this is true, then how do people manage their Replit DBs?
I think what you’ve hightlighted is a huge problem. What the agent says is true. You might not be able to see the db but it is connected via your environment variables (Secrets). To see the database in the UI, I believe you have to do the following (going from memory here…)
- Create a blank database using the tools pane. (instead of asking the Agent)
- Then you have to ensure that Secrets (environment variables) are updated with that particular db’s settings.
- Then you can ask the Agent to actively use that particular database and you’ll be able to see all the tables and data via the Database tools pane.
However when you fork that app, you’ll lose the UI visibility but the database will still be connected.
1 Like
Appreciate the details @anilmalhotra2! And indeed, how clunky and messy!
For about 90 minutes I was excited I might return to their DB. But I think I will stick with Supabase. It’s external, so I have to poke and prod it myself - Replit agent can’t “see” it. And for any schema updates, I need the agent to give me the SQL and ask me to run it. So all a lot more manual. But I feel like I have complete control and visibility. And my own branded auth too.
I’ll see what others say. But like a few other things in the Replit workspace, I think they need a lot of re-work. Now they’ve got the actual AI working nicely, perhaps it is time for them to step back and look at the bigger developer process.
Yes I’m eager to hear some workarounds (or the best practice if my approach is not correct).
1 Like
Me too. I’d love to find a way to stay in the Replit DB, but,…
Whoooaahhh! I’ve just woken up and gone back into the new app. I opened the database tool, and suddenly, as if by magic, there is my DB from the app I created yesterday.
I didn’t do any of the steps you suggested @anilmalhotra2, it has just appeared overnight.
Even better news! Hopefully a turn in the user experience for Replit DB.
But i wonder why the overnight delay to add it in. Should be instant.