feat: savings allocations
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m31s
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m31s
This commit is contained in:
parent
ff237e2fab
commit
2dac136049
17 changed files with 1140 additions and 4 deletions
15
internal/db/migrations/00013_index_allocation_audit_logs.sql
Normal file
15
internal/db/migrations/00013_index_allocation_audit_logs.sql
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
-- Mirror of idx_space_audit_logs_account_id but for allocation.* actions, so
|
||||
-- the account-scoped activity feed can OR-merge the two prefixes without a
|
||||
-- sequential scan over space_audit_logs.
|
||||
|
||||
CREATE INDEX idx_space_audit_logs_allocation_account_id
|
||||
ON space_audit_logs ((metadata->>'account_id'), created_at DESC)
|
||||
WHERE action LIKE 'allocation.%';
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP INDEX IF EXISTS idx_space_audit_logs_allocation_account_id;
|
||||
-- +goose StatementEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue