diff --git a/purchase.py b/purchase.py index af101e482a..57cf20524d 100644 --- a/purchase.py +++ b/purchase.py @@ -239,6 +239,7 @@ class Purchase( @classmethod def __setup__(cls): super(Purchase, cls).__setup__() + cls.create_date.select = True cls._order = [ ('purchase_date', 'DESC NULLS FIRST'), ('id', 'DESC'), @@ -359,9 +360,6 @@ class Purchase( values=['processing'], where=sql_table.id.in_(sub_query.select(sub_query.id)))) - # Add index on create_date - table.index_action('create_date', action='add') - # Migration from 5.6: rename state cancel to cancelled cursor.execute(*sql_table.update( [sql_table.state], ['cancelled'],