mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 19:01:47 +00:00
chore(db): adiciona índice composto para filtros de lançamentos
This commit is contained in:
@@ -634,6 +634,12 @@ export const transactions = pgTable(
|
||||
table.payerId,
|
||||
table.period,
|
||||
),
|
||||
// Índice composto para o filtro quente do dashboard: userId + payerId + period
|
||||
userIdPayerIdPeriodIdx: index("lancamentos_user_id_pagador_id_period_idx").on(
|
||||
table.userId,
|
||||
table.payerId,
|
||||
table.period,
|
||||
),
|
||||
// Índice para queries ordenadas por data de compra
|
||||
userIdPurchaseDateIdx: index("lancamentos_user_id_purchase_date_idx").on(
|
||||
table.userId,
|
||||
|
||||
Reference in New Issue
Block a user