Database design in Laravel: one database for multiple projects or one per project?
Hi everyone 👋
I’m currently discussing this with my team and would love to hear opinions from the community.
The question is simple:
Should we use one shared database for multiple Laravel applications?
Or is it better to have a separate database per application?
From what I’ve seen and in my own experience, I tend to prefer one database per app.
It feels cleaner since each project owns its own migrations and seeders, and deployments don’t risk breaking other apps.
But I also understand the counter-argument: with a shared DB you avoid duplicating schemas and sometimes reporting is easier.
Question
👉 Based on your professional experience, which approach works best long-term in Laravel projects?
Do you also recommend one DB per app?
Or have you found success maintaining a single DB across multiple apps?
I’d like to reinforce this discussion with my team using insights from the community.
@Tray2 Thanks for the clarification! In my case, I mean separate schemas per application vs. one shared schema across multiple apps. Since Laravel migrations and seeders are app-specific, I see a real risk of conflicts if two projects touch the same schema. That’s why I lean towards giving each app its own schema, even if they all run on the same server. This way I can still maintain a single server while improving maintainability.
Would you agree this is usually the safer long-term practice?
They should have their own schema, the only only time they should share the schema, is when it's a multi-tenant app, or there is web version and one mobile app for the same app.
Ive seen the odd case of multiple applications using the same schema (the same database) and it never ends well. Its a bit of a maintenance nightmare, and certain scenarios might require you to take all apps off line at once.
If you go down this route, I would create a separate application and repo just for the migrations and put one person in charge of it. Any changes needed to the schema for one app have to go through this one person so that they can consider the global implications. All migrations would need to be through the database app.
Don't use the database for sessions or queues, Use another technology like redis where you can tag the content per application.
Im sure there are loads of other issues that are not immediately apparent when you choose to walk down the road less travelled.
@adrianchodev You should have a database per separate Laravel application. I’m not sure why you would “share” a database between multiple, unrelated applications.