-
Notifications
You must be signed in to change notification settings - Fork 41
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
[Task]: Migrate from BlockVersion.soft
to BlockVersion.block_type
#15111
[Task]: Migrate from BlockVersion.soft
to BlockVersion.block_type
#15111
Comments
If there was a django field for |
With some luck it's just a couple lines of code to change since we already have a |
Question @diox would it be possible to migrate from Wdyt? |
I would prefer avoiding migrating a table that has millions of rows over and over. The custom |
@diox looking at the bloom filter and it's kind of not very much fun to try continuing on that without this so I opened a PR just now.. I see you've assigned @bakulf maybe could be used as a reference but I think having the dango integer choices field is my main ask at this point. class BlockType(models.IntegerChoices):
BLOCKED = 0, _('Blocked')
SOFT_BLOCKED = 1, _('Restricted') If this class exists and is then used by both models, then I don't really care about any other details underlying as I can rely on that enum to build out the block_type based filtering logic. wdyt? |
Hello, can you please help me with some information, I don't understand exactly what I need to check. Thank you very much! |
@alexandruschek this task cannot be tested. This is just an internal code change. |
Description
#15012 introduced soft-blocks by adding a
soft
BooleanField
toBlockVersion
.We debated switching to a
block_type
IntegerField
instead (or probably aPositiveSmallIntegerField
) and initially resisted, in part because the migration is annoying/costly, but it has since become clear this will make our lives easier, by allowing us to have constants/choices that are simpler to deal with (we can't haveChoices
with booleans).Acceptance Criteria
Milestones/checkpoints
Checks
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: