diff --git a/lfs/core/management/commands/lfs_migrate.py b/lfs/core/management/commands/lfs_migrate.py index d93a251e0..6ca1b603c 100644 --- a/lfs/core/management/commands/lfs_migrate.py +++ b/lfs/core/management/commands/lfs_migrate.py @@ -520,6 +520,11 @@ def migrate_to_08(self, application, version): ('current_category', models.fields.BooleanField(default=False)), ('slideshow', models.fields.BooleanField(default=False)), )) + + # Create an index for the product sorting fields + db.create_index("catalog_product", ["name"]) + db.create_index("catalog_product", ["price"]) + db.create_index("catalog_product", ["effective_price"]) application.version = "0.8" application.save()