

CREATE TABLE source_domains (
id INT AUTO_INCREMENT PRIMARY KEY,
domain_name VARCHAR(255)
);

CREATE TABLE target_domains (
id INT AUTO_INCREMENT PRIMARY KEY,
domain_name VARCHAR(255)
);

CREATE TABLE redirects (
id INT AUTO_INCREMENT PRIMARY KEY,
source_id INT,
target_id INT
);

CREATE TABLE redirect_logs (
id INT AUTO_INCREMENT PRIMARY KEY,
source_domain VARCHAR(255),
target_domain VARCHAR(255),
ip_address VARCHAR(50),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
