Skip to content

Commit

Permalink
trytond: Remove index dumping mechanism [CUSTOM]
Browse files Browse the repository at this point in the history
  • Loading branch information
JCavallo committed Sep 16, 2024
1 parent 8307b51 commit 3a6e6af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions trytond/trytond/model/modelsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,16 +566,6 @@ def no_subset(index):
indexes = filter(no_subset, cls._history_sql_indexes)
history_th.set_indexes(indexes, concurrently=concurrently)

@classmethod
def _dump_sql_indexes(cls, file, concurrently):
if not callable(cls.table_query):
table_h = cls.__table_handler__()
table_h.dump_indexes(cls._sql_indexes, file, concurrently)
if cls._history:
history_th = cls.__table_handler__(history=True)
history_th.dump_indexes(
cls._history_sql_indexes, file, concurrently)

@classmethod
def _update_history_table(cls):
if cls._history:
Expand Down
10 changes: 0 additions & 10 deletions trytond/trytond/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,6 @@ def create_indexes(concurrently):
if update:
if indexes or indexes is None:
create_indexes(concurrently=False)
else:
with tempfile.NamedTemporaryFile(
suffix='.sql', delete=False) as tfd:
for model_name in models_with_indexes:
model = pool.get(model_name)
if model._sql_indexes:
model._dump_sql_indexes(tfd)
logger.warning(
'index:skipping indexes creation. SQL dumped on %s',
tfd.name)
for model_name in models_to_update_history:
model = pool.get(model_name)
if model._history:
Expand Down

0 comments on commit 3a6e6af

Please sign in to comment.