When Forking a Replit with a Database -- does the database get copied over as well?

Since the big update in the beginning of the year, one Replit that is shared with me has been acting funny including console.log not logging and now I noticed the webview is coming up as a blank page. Nothing in the HTML file or express.js functions has been changed since before the update.

The owner has re-deployed a few weeks ago as I thought maybe that would get everything to update and fix it but I noticed it has not. This Replit does have a database and I’m curious if the owner were to fork it and deploy the fork, would the database still be connected?

I guess another question would be, would forking even be a solution to these issues? It’s really only been this one project that I’ve seen these issues, all other shared Repls and my Repls are logging correctly/webview working so I’m just a bit confused why this one has been having all these issues.

Thanks.

1 Like

Short answer, no.

Can you send the link to the Repl?

3 Likes

no because each and every fork generates a db which I believe is encoded through the reply identifier. This means that not only does the db not copy, even running a console db will spawn a new db

3 Likes

It could’ve appeared in the devtools? In the Webview, click the spanner icon, then look under the Console. The output should be there. If nothing appears, open the website in a new tab, right click and click ‘Inspect’, or press F12. Look under the Console.
If not, it’s probably a bug since it should appear in the Console of your repl. Maybe it got lost in server data?


No, I don’t think Replit DB even works in deployments. If you want the database to be conne ted to the priginal repl, use a database proxy made by Replit, but note that it is very insecure and can be hacked very easily. In fact, the database proxy may not even work with this replit.dev domains now.


Maybe, some bugs still go on with forked repls. If you want to fork, loop through every key and value of the database and copy it (e.g. print the value of each key you have, and dump them in Notepad, sorted by key). Test it out on another repl first, in case you lose any data.

…What makes you think they’re using Replit DB?

Topic tags:

replit-postgresql

And Replit DB does work in deployments (if you use the latest version)

2 Likes