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

Support "ON UPDATE CURRENT_TIMESTAMP" for MySQL #6286

Open
MichelJonkman opened this issue Jan 30, 2024 · 0 comments
Open

Support "ON UPDATE CURRENT_TIMESTAMP" for MySQL #6286

MichelJonkman opened this issue Jan 30, 2024 · 0 comments

Comments

@MichelJonkman
Copy link

Feature Request

Q A
New Feature yes
RFC no

Summary

MySQL supports the syntax DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP nowadays which is very useful for updated_at fields. I would try to add such support myself but looking at the code it doesn't seem very easy to do so at first glance.

I'm currently only using this package for it's schema diff functionality for a declarative schema approach that can be used with any framework and ORM (mainly for Laravel) or even just vanilla PHP. As such being able to define updated_at fields like this ensures that this functionality will always work regardless of how the row gets updated.

If any more information is needed do not hesitate to ask!

PS, I haven't been able to find anything to support virtual columns, are these unsupported and should I create another feature request for this?

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

No branches or pull requests

1 participant