Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

coolmatty's avatar

Local dev alternatives for databases

It's been a real annoyance to use SQLite in my local development. Since our production server uses PostgreSQL, there's been multiple instances where the queries just don't line up. Understandably, SQLite is a pared down system, but if I can't rely on my tests and code to execute equally on local and production, it is hindering me, not helping.

I'm sure for many, the first instinct is to just install PostgreSQL and call it a day. That's an option, and it'll be the one I pick if I don't have an alternative. But the most significant problem I have with it is the fact that I work on different computers. Sometimes I'm at my desk, on my main PC, and that's all fine. But I also have my Macbook that I do a good chunk of work on.

Dropbox has been keeping my SQLite DBs in sync, but what about PostgreSQL? A cursory glance on Google seems to indicate that using Dropbox to sync a PostgreSQL DB will only end in tears.

Does anyone else deal with a similar situation? How did you solve it? Am I stuck maintaining two local development DBs?

0 likes
3 replies
mikebronner's avatar
Level 16

Why not utilize a hosted PostgreSQL service for your dev db? http://www.postgresql.org/support/professional_hosting/northamerica/

Of course the drawback here is that you'd be require an internet connection at all times, not necessarily a good thing for a dev environment.

The only other option I see would be to set up your laptop as your local database server, and when you're working from your desktop, you could simply connect to it, provided you have it on the same network and running.

Generally speaking I get around this issue by having seeding configured to apply all the data I need for dev purposes, and not rely on specific data that may be on one machine or another. Then commit those seed files to git, sync with your other computer, and should be good to go.

coolmatty's avatar

I think the last option is probably going to be the one I'll deal with, for the same reasons you gave. I don't want to rely on an internet connection, and I don't want to require my laptop to be turned on. I'll just have to be more diligent about seeding.

Please or to participate in this conversation.