Files
leonwww/dns/migrations/003_add_ns_records.sql

10 lines
524 B
MySQL
Raw Normal View History

2025-08-21 12:27:44 +03:00
-- Re-add NS record support and extend record types
2025-11-08 15:48:53 +08:00
-- MySQL doesn't support direct DROP CONSTRAINT syntax
-- MySQL 8.0+ supports CHECK constraints, but we'll skip adding for compatibility
2025-08-21 12:27:44 +03:00
-- Add index for efficient NS record lookups during delegation
2025-11-08 15:48:53 +08:00
-- MySQL doesn't support WHERE clause in CREATE INDEX
CREATE INDEX idx_dns_records_ns_lookup ON dns_records(record_type, name);
2025-08-21 12:27:44 +03:00
-- Add index for subdomain resolution optimization
2025-11-08 15:06:30 +08:00
CREATE INDEX idx_dns_records_subdomain_lookup ON dns_records(domain_id, name, record_type);