CREATE TABLE `cars` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `name` VARCHAR(255) NOT NULL,
    `price` VARCHAR(255) NOT NULL,
    `monthly_price` VARCHAR(255) DEFAULT NULL,
    `mileage` INT NOT NULL,
    `year` INT NOT NULL,
    `fuel_type` VARCHAR(50) NOT NULL,
    `dealer_name` VARCHAR(255) NOT NULL,
    `car_link` TEXT NOT NULL UNIQUE,
    `car_img` TEXT NOT NULL,
    `image_alt_text` TEXT NOT NULL,
    `timestamp` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE `import_log` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `scraped_url` TEXT NOT NULL,
    `status` VARCHAR(50) NOT NULL,
    `error_message` TEXT DEFAULT NULL,
    `timestamp` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
