Use select to True on create_date
If the index is created only in __register__ then it is dropped before being created again. issue11197 review389881002
This commit is contained in:
1 parent
b3865b38d5
commit
e73d488ebb
1 file changed
+1
-3
@@ -270,6 +270,7 @@ class Sale(
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Sale, cls).__setup__()
|
||||
cls.create_date.select = True
|
||||
cls._order = [
|
||||
('sale_date', 'DESC NULLS FIRST'),
|
||||
('id', 'DESC'),
|
||||
@@ -352,9 +353,6 @@ class Sale(
|
||||
# Migration from 4.0: Drop not null on payment_term
|
||||
table.not_null_action('payment_term', 'remove')
|
||||
|
||||
# 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'],
|
||||
|
||||
Reference in new issue
Block a user