eloquent-driver
eloquent-driver copied to clipboard
Create migration file when blueprint updated for data type stored in DB
Obviously a luxury-end feature request, but it'd be really handy!
At the moment, if a data type (eg users) is moved from static files to the database, and then the blueprint is updated (eg to add a job title field) — then you need to also manually create a database migration file and type in the lines to create each new column in the database table.
In an ideal world, I'd love it if Statamic created migration files whenever the blueprint was updated for a datatype that is stored in the database, and then prompted you to run the file with the correct command.
Yeah agreed this would be nice, but unfortunately there are a lot of edge cases to think about (as an example how do you know if a field has been renamed versus it being deleted and a new one added).
Something to think about anyway.