refactor: update AS entry handling in API and database to support ASN-only entries. Remove prefix field from AS entry structure and adjust related functions and tests. Enhance OpenAPI specifications and documentation to reflect changes in AS entry representation.

This commit is contained in:
Denozordec
2026-04-05 22:38:17 +07:00
parent 73d0003281
commit 1db6b5b7b2
19 changed files with 218 additions and 115 deletions
@@ -0,0 +1,9 @@
-- AS-запись: только ASN + community; снимок ревизии может хранить ключи вида as:<asn>.
ALTER TABLE revision_materialized_prefix
ALTER COLUMN prefix TYPE TEXT USING prefix::text;
DELETE FROM module_as_entry WHERE asn IS NULL;
ALTER TABLE module_as_entry DROP CONSTRAINT module_as_entry_asn_or_prefix_chk;
ALTER TABLE module_as_entry DROP COLUMN prefix;
ALTER TABLE module_as_entry ALTER COLUMN asn SET NOT NULL;