From fe1b4fa541c9e396f26f4462faee8a299a8a314c Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 15 Apr 2020 11:02:53 +0200 Subject: [PATCH] misc: move AddIndex to end of 0002 migration (#39544) Automatic generation does not sort AddIndex for manual indexes correctly with respect to Remove/AddField. --- .../migrations/0002_auto_20200415_0341.py | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/atreal_openads/migrations/0002_auto_20200415_0341.py b/atreal_openads/migrations/0002_auto_20200415_0341.py index 3f63157..695b010 100644 --- a/atreal_openads/migrations/0002_auto_20200415_0341.py +++ b/atreal_openads/migrations/0002_auto_20200415_0341.py @@ -171,38 +171,6 @@ class Migration(migrations.Migration): name='upload_status', field=models.CharField(choices=[('pending', 'Pending'), ('uploading', 'Uploading'), ('failed', 'Failed'), ('success', 'Success')], default='pending', max_length=10, verbose_name='Upload status'), ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['connecteur'], name='ff_connecteur_idx'), - ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['collectivite'], name='ff_collectivite_idx'), - ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['numero_demande', 'numero_dossier'], name='ff_deman_doss_idx'), - ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['numero_demande'], name='ff_demande_idx'), - ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['numero_dossier'], name='ff_dossier_idx'), - ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['orig_filename'], name='ff_filename_idx'), - ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['upload_status'], name='ff_status_idx'), - ), - migrations.AddIndex( - model_name='forwardfile', - index=models.Index(fields=['last_update_datetime'], name='ff_last_up_dt_idx'), - ), migrations.AddField( model_name='guichet', name='collectivite', @@ -238,4 +206,36 @@ class Migration(migrations.Migration): name='collectivite', unique_together=set([('connecteur', 'openADS_id')]), ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['connecteur'], name='ff_connecteur_idx'), + ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['collectivite'], name='ff_collectivite_idx'), + ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['numero_demande', 'numero_dossier'], name='ff_deman_doss_idx'), + ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['numero_demande'], name='ff_demande_idx'), + ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['numero_dossier'], name='ff_dossier_idx'), + ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['orig_filename'], name='ff_filename_idx'), + ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['upload_status'], name='ff_status_idx'), + ), + migrations.AddIndex( + model_name='forwardfile', + index=models.Index(fields=['last_update_datetime'], name='ff_last_up_dt_idx'), + ), ]