refactor(db): normalize asn prefix cache and ttl cleanup

Строки asn_prefix_cache_row; периодический prune через evobgp-ingest.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-05-25 10:58:57 +07:00
co-authored by Cursor
parent 3500bd4624
commit 990cc739df
9 changed files with 137 additions and 14 deletions
@@ -0,0 +1,2 @@
ALTER TABLE asn_prefix_cache ADD COLUMN prefixes_json TEXT NOT NULL DEFAULT '[]';
DROP TABLE IF EXISTS asn_prefix_cache_row;
@@ -0,0 +1,7 @@
CREATE TABLE asn_prefix_cache_row (
asn INTEGER NOT NULL REFERENCES asn_prefix_cache (asn) ON DELETE CASCADE,
prefix TEXT NOT NULL,
PRIMARY KEY (asn, prefix)
);
ALTER TABLE asn_prefix_cache DROP COLUMN prefixes_json;