-- Make IP column optional for domains
ALTER TABLE domains MODIFY COLUMN ip VARCHAR(255) NULL;

-- Update DNS records constraint to only allow 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