Files
quyun-v2/backend/database/migrations/20251218164000_orders_amount_paid_index.sql

12 lines
368 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- +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