Skip to content

Use dynamic model variables for timestamp column names #839

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

Conversation

stoutput
Copy link
Contributor

Replaces hardcoded "created_at" and "updated_at" timestamp column names with base model's date_created_at and date_updated_at variables. This allows configurability over which columns to use with the timestamps mixin. Besides, if we're already using these variables for date casting, we should also use them in the mixin.

@stoutput
Copy link
Contributor Author

@josephmancuso What do you think? Been waiting on this one for a while to finish out a PR in another repo.

@stoutput
Copy link
Contributor Author

I seem to recall dynamic timestamp column names had been implemented at one point in the past, but I'm not totally sure...

@josephmancuso josephmancuso merged commit d9c8e13 into MasoniteFramework:2.0 Sep 30, 2023
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

Successfully merging this pull request may close these issues.

2 participants