[PATCH] migrations: Optimize 0007 patch comment for psql

Andy Doan andy.doan at linaro.org
Fri Mar 25 00:52:19 AEDT 2016


On 03/23/2016 12:01 PM, Finucane, Stephen wrote:
> On 17 Mar 16:04, Andy Doan wrote:
>> By handling comment copying/deletion via SQL we can make migration take
>> <3 minutes rather than >30minutes for big instances. The SQL is vendor
>> specific, so a similar query would need to be added to support MySQL.
>>
>> Signed-off-by: Andy Doan <andy.doan at linaro.org>
>
> Some nits below, but nothing important so happy to merge. Any chance
> you want to do the same for MySQL? :)

I'll give it a shot.


> I'd rather this check be done in each function, rather than having multiple
> functions. It just seems...cleaner.

will do

>>   def recreate_comments(apps, schema_editor):
>
> Is it possible to migrate this also? Is it worth it?

I'm sure someone with more DB experience would have a trick, but given 
its only for a reverse migration I figured it wasn't worth it.


More information about the Patchwork mailing list