Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create migration file when blueprint updated for data type stored in DB #363

Open
steveparks opened this issue Oct 10, 2024 · 1 comment
Labels
feature request New feature or request

Comments

@steveparks
Copy link

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.

@duncanmcclean duncanmcclean transferred this issue from statamic/ideas Oct 11, 2024
@duncanmcclean duncanmcclean added the feature request New feature or request label Oct 11, 2024
@ryanmitchell
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants