-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Rename created and updated properties on models #274
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/iaincollins/next-auth-docs/l3fe37cqj |
Update: I have refactored and slightly improved the original process in this PR and have updated this comment accordingly. What I didI thought I would document what I did as this "process" (which is a strong word for it…) is not documented anywhere right now! I wouldn't mind refactoring the database tests as part of this PR. Start test databasesTo get started, I loaded Note: They all listen locally on their default ports, so will clash if you are already running any of these databases on your system. This is something I plan to address in the tests by running them from inside a Docker container at some point (not in this PR). The Docker images have hard coded auth credentials (
I use the commands to run/clean up the databases during manual testing too, as it's a lot easier to test against different databases that way. After starting databases, I run Updated models
Modify schemas
The whole process is a bit janky but I feel helpful to have some level of automation to test and document schema changes. In a future PR I tend to update the tests and documentation to migrate the tests to an actual test framework and refactor the documentation so that it is programatically generated (and so is always up-to-date). |
ba770e8
to
b1bb850
Compare
Fixed! I rebased against an old branch (instead of main). Doh! Changes should be easier to read now. |
4d5bfb5
to
ea78020
Compare
ea78020
to
fab1214
Compare
@LoriKarikari Based on feedback I've removed the 'default' value when the field is not nullable so it's more clear if a field actually has a default value or not. Note: I don't actually think hand rolling some DB tests like this is a great idea, I was just out of other better ways to do SOMETHING in the short term. I think the new test stuff that is coming will result in something much better (and we can uses some of this to help get there I think) RE: @JeffersonBledsoe / #66 |
Based on changes suggested in #254
created
property tocreated_at
(createdAt
on MongoDB) on all modelsupdated
property toupdated_at
(updated At
on MongoDB) on all models