[PATCH v2 1/5] api: add addressed field and detail endpoint for patch comments

Daniel Axtens dja at axtens.net
Thu Aug 19 15:50:04 AEST 2021


>> > +    operations = [
>> > +        migrations.AddField(
>> > +            model_name='patchcomment',
>> > +            name='addressed',
>> > +            field=models.BooleanField(default=False),
>
> Thinking out loud: I suspect this will be an expensive migration since it will
> add a new non-nullable field to all patchcomment rows. Maybe that's something we
> can live with, but making this nullable might make more sense, particularly if
> we want to make this feature enableable/disableable on a project-by-project
> basis (I don't know if we do).

I tested this on MariaDB 10.4 and it was ~instantaneous even with my
large data set.

I also tested it with Postgres and it was also less than a second.

I think we're fine as is.

Kind regards,
Daniel


More information about the Patchwork mailing list