Skip to content
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(deletion) Remove aborted field from the model #29297

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

markstory
Copy link
Member

We don't use this field in the current implementation of deletions and can remove it from the model state so that it can be removed from the schema in the future.

We don't use this field in the current implementation of deletions and
can remove it from the model state so that it can be removed from the
schema in the future.
@markstory markstory requested a review from a team October 13, 2021 20:03
@markstory markstory requested a review from a team as a code owner October 13, 2021 20:03
@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2021

This PR has a migration; here is the generated SQL

BEGIN;
--
-- Custom state/database change combination
--
ALTER TABLE sentry_scheduleddeletion ALTER COLUMN aborted DROP NOT NULL;
COMMIT;

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to mark this as nullable first, otherwise creating new rows will fail (the default is applied at the app level not the db level).

https://develop.sentry.dev/database-migrations/#deleting-columnstables

If you want to save a step, then I think it would be safe enough to do it in the database_operations of this migration

@markstory
Copy link
Member Author

You will need to mark this as nullable first, otherwise creating new rows will fail (the default is applied at the app level not the db level).

Thanks for spotting that. I had assumed the default was in the database. 😞

@markstory markstory merged commit 7158502 into master Oct 14, 2021
@markstory markstory deleted the chore-simpler-deletionmodel branch October 14, 2021 16:12
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants