I’ve recently taken a foray into Laravel to understand some of the DX, and specifically what aspects of it could improve my velocity.
One huge win (IMO) is the blueprint package that isn’t part of core Laravel, but is widely used. It allows a set of models to be sketched in a single file (specifying relationships, etc.) in a very succinct way, and also to build out all the models with a single command on the CLI. Even more importantly, there’s a single command to erase the previous iteration of models, update the sketch and rebuild, then migrate and (optionally) seed the database with some fake data.
Comparing this to issuing individual commands via CLI to scaffold out a model, then going into individual model files to remind myself what columns / models I added when trying to iterate quickly is much more difficult. Obviously the end result is very similar, but the individual scaffolding requires a lot more back-and-forth, and many more commands with each iteration.
So, simple question: is there an Ecto equivalent to Blueprint, or a way to achieve a similar effect where I can sketch out models and try it out / roll back as needed?
A slight aside, this also works amazingly well with the Filament package, which introspects the database and generates controllers and views for a CRUD page with a single command. This is very, very handy for checking that relationships defined in the model sketch work as intended.
Would love to know thoughts of the community, since this is probably the main area where I saw a huge difference in how quickly I could build something meaningful.