CREATE DATABASE locare_db;

USE locare_db;

CREATE TABLE monitoring_data (
    id INT(11) AUTO_INCREMENT PRIMARY KEY,
    suhu FLOAT NOT NULL,
    kelembaban FLOAT NOT NULL,
    kualitas_udara VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
    konsentrasi_gas VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
    intensitas_cahaya VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
    waktu DATETIME DEFAULT CURRENT_TIMESTAMP,
    co2 FLOAT NOT NULL,
    pm25 FLOAT NOT NULL,
    amonia FLOAT NOT NULL
);
