Roundup Tracker - Issues


Author rouilj
Recipients rouilj, schlatterbeck
Date 2022-11-26.20:56:24
Message-id <>
As a workaround a call can be made in

     if hasattr (db, 'sql'):
        db.sql ('create index _issue_status_idx on _issue (_status);')

but this only works when the tracker is initialized. If any column is dropped
it will wipe out the index. For a single column this isn't an issue (there is
nothing to index). But it is unknown what happens to a multi-column index that
references a missing column.

Also the proposed addition only handle a single column index.
Multi-column indexes which might be needed for some use-cases (e.g to speed
up searches).
Ideally we would hook custom indexing into the schema update/create method.

However I wonder if we can provide a hook to run on schema change to
make this easier.

import roundup.backends.rdbms_common

class Database:

   create_supplimentary_indexes(classname, added_props[], ...):
       admin does his sql here.
       self.sql( <insert sql statement here> )

   drop_supplimentary_indexes(classname, dropped_props[], ...):
       admin does his sql here.
       self.sql( <insert sql statement here> )

and they gets called as part of update_class() and
Date User Action Args
2022-11-26 20:56:24rouiljsetmessageid: <>
2022-11-26 20:56:24rouiljsetrecipients: + rouilj, schlatterbeck
2022-11-26 20:56:24rouiljlinkissue2551245 messages
2022-11-26 20:56:24rouiljcreate