CREATE TABLE master_ternak (
    id INT(11) COLLATE utf8mb4_general_ci NOT NULL PRIMARY KEY AUTO_INCREMENT,
    eartag VARCHAR(50) COLLATE utf8mb4_general_ci NOT NULL,
    description TEXT,
    active SMALLINT NOT NULL DEFAULT 1,
    created_by INT NOT NULL,
    created_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_by INT NOT NULL,
    updated_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    deleted_by INT
);

UPDATE submenu SET image = 'ternak.svg' WHERE name = 'Data Ternak';