-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
chore(github-growth): drop commitfilechange language column in django #56601
chore(github-growth): drop commitfilechange language column in django #56601
Conversation
migrations.RemoveField( | ||
model_name="commitfilechange", | ||
name="language", | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unsafe operation as it will cause failures in production when the column is removed whilst application code is using it. You'll need to remove the column from django state first, then remove the schema column. This develop guide has an example of what migrations should look like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will it still be dangerous when following the process in the dev guide?
This PR has a migration; here is the generated SQL for --
-- Custom state/database change combination
-- |
Codecov Report
@@ Coverage Diff @@
## master #56601 +/- ##
===========================================
+ Coverage 51.70% 78.62% +26.92%
===========================================
Files 5065 5083 +18
Lines 218566 219073 +507
Branches 37010 37093 +83
===========================================
+ Hits 113017 172255 +59238
+ Misses 103455 41249 -62206
- Partials 2094 5569 +3475
|
# - Adding indexes to large tables. Since this can take a long time, we'd generally prefer to | ||
# have ops run this and not block the deploy. Note that while adding an index is a schema | ||
# change, it's completely safe to run the operation after the code has deployed. | ||
is_dangerous = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_dangerous = True | |
is_dangerous = False |
State only changes don't need to be dangerous.
2b14faa
to
837b7ab
Compare
This PR has a migration; here is the generated SQL for --
-- Custom state/database change combination
-- |
See #56491 for context
After this I will add a migration to remove the column in Postgres.