CREATE TABLE IF NOT EXISTS medicos (
    id              INT UNSIGNED    NOT NULL AUTO_INCREMENT,
    codigo          VARCHAR(20)     NOT NULL UNIQUE,
    nombres         VARCHAR(100)    NOT NULL,
    apellidos       VARCHAR(100)    NOT NULL,
    cod_especialidad VARCHAR(50)    DEFAULT NULL,
    docidmedico     VARCHAR(30)     DEFAULT NULL,
    activo          TINYINT(1)      NOT NULL DEFAULT 1,
    creado_at       DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    actualizado_at  DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
