-
Notifications
You must be signed in to change notification settings - Fork 63
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
Warn on console when a generated migration contains reviewable steps #142
Comments
+1; just ran into this and was quite surprised. Coming from Django/Rails, they don't have such strong guardrails for destructive migrations, and it feels a bit overbearing for the generator to assume my changes were erroneous. Not that I don't appreciate the thought! I've seen plenty of migrations gone awry. IMO a sweet spot would be to have the warnings @joshprice suggests and then make it an opt-in configurable behavior to have destructive operations commented out or not. |
I like that idea. Warnings + optional opt out does seem like a good compromise for new users and powerusers alike. |
Is your feature request related to a problem? Please describe.
Destructive actions are commented out in generated migrations, but it's not clear to the user that something in the migration needs review.
Describe the solution you'd like
Ideally you should always review your migrations, but it'd be great to remind people of this with a note to this effect. Eg
Please always manually review the generated migrations for correctness
When there is something for review we should warn the user more emphatically to do so. Eg
Warning: there are migration steps commented out and in need of manual review
The text was updated successfully, but these errors were encountered: