tenant: admin orders sort whitelist

This commit is contained in:
2025-12-18 23:36:57 +08:00
parent 71bd15024e
commit 549339be74
8 changed files with 144 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
-- +goose Up
-- +goose StatementBegin
-- orders 列表查询索引补齐:租户管理端常用按 created_at/type 过滤 + 排序。
CREATE INDEX IF NOT EXISTS ix_orders_tenant_created_at ON orders(tenant_id, created_at);
CREATE INDEX IF NOT EXISTS ix_orders_tenant_type ON orders(tenant_id, type);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP INDEX IF EXISTS ix_orders_tenant_type;
DROP INDEX IF EXISTS ix_orders_tenant_created_at;
-- +goose StatementEnd