-
Notifications
You must be signed in to change notification settings - Fork 16
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
Enable DDL statement logging during migrate
command
#418
Comments
Maybe this is simply achieved (at least the DDL statement logging) by setting the |
yes, that's a very valid point |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logging the DDL statements executed during a migration will greatly help troubleshooting, debugging, and manually recovering from a failed migration.
The current behaviour just appears to log the last error received from the database driver. If the error contains some identifiable context, maybe that helps, but if the error is more generic, we are completely lost.
Current behaviour when an error occurs:
0012_funky_horse_calipers.sql
worked but0013_sad_panda_noises.sql
failed)I suggest that when
config.verbose
is false, themigrate
command should just log the name of each migration file before its DDL statements are executed. Whenconfig.verbose
is true, themigrate
command should also log each DDL right before it is executed. Then themigration
command output should be detailed enough to troubleshoot the problem.Here is an example error (caused by a manual edit of a migration file which was pushed without a local test)
My drizzle.config.ts is:
Thanks for the great work so far!
The text was updated successfully, but these errors were encountered: