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

zaster's avatar

ER Diagram - MySQL Workbench - Laravel Migrations

I thought of designing my ER Diagrams through mysql workbench and then convert those to laravel migrations. This seems to work well

The other way round works too (Reveres Engineering)

Is this a good way of doing things

I am a solo developer

I need to do this because, it allows me to visually view the tables and relationships and kind of add more control using graphical elements(add constraints, unique keys etc..)

0 likes
3 replies
automica's avatar

I tend to work with a migration first and then I might tweak the table to add columns and reflect the changes into my migrations.

There’s no right or wrong way so as long as you end up with a functioning migration file then your way sounds good.

zaster's avatar

@automica So there is no visualization in the entire database at the beginning, in how you do.

automica's avatar
automica
Best Answer
Level 54

I don’ my find it necessary to visualise the complete table structure as I just work model to model and ensure I have correct eloquent relationships set up.

I will sometimes draw relationship maps on paper before adding new models, especially if there are a few tables going in.

I may do more if I’m on a brand new greenfield project especially if I’ve got to explain functionality to other devs.

Please or to participate in this conversation.