Stewart Smith <stew...@flamingspork.com> writes:

> On Jul 16, 2021, at 10:20 AM, Daniel Axtens <d...@axtens.net> wrote:
>> 
>>  - we do a lot of legwork to prevent there being a column with the same
>>   name in a base class and subclass. This is purely for django's benefit
>>   as databases don't see the class relationship and handle column names
>>   being the same across tables just fine. Unfortunately renaming columns
>>   in MySQL/MariaDB is _extremely_ expensive. So just don't do it: lie to
>>   django about the names of the duplicate columns.
>
> I believe that modern versions can ALTER TABLE ONLINE to do a column rename 
> without having to copy all the data. Should also work for adding columns 
> (some types).
>
> Arguably Django could probably switch to trying specifying ONLINE as the 
> method and falling back to offline (full copy) if it can’t do it online. 

Oh that's handy to know, I'll see if I can use that to simplify some of
the series.

Arguably Django should use it but I'm definitely not going to try to
monkey-patch that in!

Kind regards,
Daniel
_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to