Skip to content

Commit 8c0fcce

Browse files
committed
fix(schema): add additional bani indexes for micro-optimization
1 parent 63e0b1e commit 8c0fcce

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/schema.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,12 @@ const createSchema = ( knex, type ) => knex.schema
244244
table.index( 'bani_id', 'idx_bani_lines_bani_id' )
245245
table.index( [ 'bani_id', 'line_group' ], 'idx_bani_lines_line_group' )
246246
} ),
247+
knex.schema.alterTable( 'banis', table => {
248+
table.index( [ 'folder_id', 'order_id' ], 'idx_banis_folder_order' )
249+
} ),
247250
knex.schema.alterTable( 'bani_bookmarks', table => {
248251
table.index( 'bani_id', 'idx_bani_bookmarks_bani_id' )
252+
table.index( [ 'bani_id', 'order_id' ], 'idx_bani_bookmarks_bani_order' )
249253
} ),
250254
knex.schema.alterTable( 'sections', table => {
251255
table.index( [ 'start_page', 'end_page' ], 'idx_sections_page_range' )

0 commit comments

Comments
 (0)