-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(migrations): Add in SafeRemoveField
migration operation
#81098
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note that this pr looks huge, but it's mostly just boilerplate from tests. I recommend marking all the tests viewed to focus on the core changes |
wedamija
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 21, 2024
This uses the new operations from getsentry/sentry#81063 getsentry/sentry#81098
095e782
to
19ca00a
Compare
markstory
reviewed
Nov 21, 2024
a3cfac3
to
e187edf
Compare
19ca00a
to
6d9aeb4
Compare
This builds on #81063 This adds in `SafeDeleteColumn`, which works the same way as `SafeDeleteModel`, except on database columns. It performs checks that the column doesn't have a db constraint set, and also that it is either nullable or has a db_default set. Similarly to `SafeDeleteModel` we still need to be careful to make sure that the pending deletion merges and deploys first, and then the real deletion.
f71a44d
to
2753829
Compare
wedamija
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 22, 2024
This uses the new operations from getsentry/sentry#81063 getsentry/sentry#81098
markstory
approved these changes
Nov 22, 2024
SafeDeleteColumn
migration operationSafeRemoveField
migration operation
wedamija
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 22, 2024
This uses the new operations from getsentry/sentry#81063 getsentry/sentry#81098
harshithadurai
pushed a commit
that referenced
this pull request
Nov 25, 2024
This builds on #81063 This adds in `SafeDeleteColumn`, which works the same way as `SafeDeleteModel`, except on database columns. It performs checks that the column doesn't have a db constraint set, and also that it is either nullable or has a db_default set. Similarly to `SafeDeleteModel` we still need to be careful to make sure that the pending deletion merges and deploys first, and then the real deletion.
ceorourke
added a commit
that referenced
this pull request
Nov 25, 2024
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
evanh
pushed a commit
that referenced
this pull request
Nov 25, 2024
This builds on #81063 This adds in `SafeDeleteColumn`, which works the same way as `SafeDeleteModel`, except on database columns. It performs checks that the column doesn't have a db constraint set, and also that it is either nullable or has a db_default set. Similarly to `SafeDeleteModel` we still need to be careful to make sure that the pending deletion merges and deploys first, and then the real deletion.
evanh
pushed a commit
that referenced
this pull request
Nov 25, 2024
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
andrewshie-sentry
pushed a commit
that referenced
this pull request
Dec 2, 2024
This builds on #81063 This adds in `SafeDeleteColumn`, which works the same way as `SafeDeleteModel`, except on database columns. It performs checks that the column doesn't have a db constraint set, and also that it is either nullable or has a db_default set. Similarly to `SafeDeleteModel` we still need to be careful to make sure that the pending deletion merges and deploys first, and then the real deletion.
andrewshie-sentry
pushed a commit
that referenced
this pull request
Dec 2, 2024
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This builds on #81063
This adds in
SafeRemoveField
, which works the same way asSafeRemoveField
, except on database columns.It performs checks that the column doesn't have a db constraint set, and also that it is either nullable or has a db_default set.
Similarly to
SafeRemoveField
we still need to be careful to make sure that the pending deletion merges and deploys first, and then the real deletion.