-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Add created_at Datetime Column To Migrations #53114
base: master
Are you sure you want to change the base?
Conversation
…time when a migration is run.
Why not stick with the |
Sounds fine to me. My thought process was the name executed is a bit more descriptive, but people are definitely used to |
Does anyone have an idea why the tests are failing? Even if I removed my changes the tests were failing. |
how is the backwards compatibility on this? will this force everyone to update their migrations table? |
Could you achieve this without any code changes by using |
Add executed_at date time column to the migrations table and fill it with the current time when the migration is run.
This sort of feature will be extremely helpful for larger teams to know when a particular migration ran. Having the date time will help with debugging if there is a bad migration. The time can then be used to correlate other things happening throughout the app or figure out who ran the migration.
Having access to more information without the user having to do anything seems like a win-win. Upgrading to Laravel 12 means they would have to add the column, but that is a simple migration and it's been done before when the ID column was added.