refactor(db): convert table index definitions from object to array syntax

The change improves consistency with the library's preferred style and makes the code more maintainable
This commit is contained in:
icarus 2025-10-14 01:53:31 +08:00
parent ffc3b43dc5
commit d4df86e6bc

View File

@ -19,10 +19,10 @@ export const videoTable = sqliteTable(
error: text('error', { mode: 'json' }),
...createUpdateTimestamps
},
(table) => ({
statusIdx: index('status_idx').on(table.status),
providerIdx: index('provider_idx').on(table.providerId),
typeIdx: index('type_idx').on(table.type),
fileIdIdx: uniqueIndex('file_id_idx').on(table.fileId)
})
(table) => [
index('status_idx').on(table.status),
index('provider_idx').on(table.providerId),
index('type_idx').on(table.type),
uniqueIndex('file_id_idx').on(table.fileId)
]
)