This commit is contained in:
2025-11-08 15:48:53 +08:00
parent 55b496f585
commit a0c1cc3f71
5 changed files with 31 additions and 33 deletions

View File

@@ -2,6 +2,5 @@
ALTER TABLE domains MODIFY COLUMN ip VARCHAR(255) NULL;
-- Update DNS records constraint to only allow A, AAAA, CNAME, TXT
ALTER TABLE dns_records DROP CONSTRAINT IF EXISTS dns_records_record_type_check;
ALTER TABLE dns_records ADD CONSTRAINT dns_records_record_type_check
CHECK (record_type IN ('A', 'AAAA', 'CNAME', 'TXT'));
-- MySQL doesn't support DROP CONSTRAINT IF EXISTS
-- MySQL 8.0+ supports CHECK constraints, but we'll use a trigger approach for compatibility