mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
feat(ops): add api key filter to system logs
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- 154_add_ops_system_logs_api_key_id.sql
|
||||
-- Persist API key database id as a queryable system log index column.
|
||||
|
||||
ALTER TABLE ops_system_logs
|
||||
ADD COLUMN IF NOT EXISTS api_key_id BIGINT;
|
||||
@@ -0,0 +1,5 @@
|
||||
-- 155_add_ops_system_logs_api_key_id_index_notx.sql
|
||||
-- Non-transactional migration: CREATE INDEX CONCURRENTLY cannot run in a transaction.
|
||||
|
||||
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_ops_system_logs_api_key_id_created_at
|
||||
ON ops_system_logs (api_key_id, created_at DESC);
|
||||
Reference in New Issue
Block a user