feat: 增加订单筛选功能,添加按金额区间筛选的数据库索引
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
-- orders.amount_paid:为“按金额区间筛选订单”提供索引(租户内隔离维度)
|
||||
CREATE INDEX IF NOT EXISTS ix_orders_tenant_amount_paid ON orders(tenant_id, amount_paid);
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP INDEX IF EXISTS ix_orders_tenant_amount_paid;
|
||||
-- +goose StatementEnd
|
||||
|
||||
Reference in New Issue
Block a user