ALTER TABLE doorSensorDevice ADD id INT(16) NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST;
CREATE TABLE doorSensorDevice
(
id INT(16) NOT NULL PRIMARY KEY AUTO_INCREMENT,
deviceId CHAR(40) NOT NULL,
batteryCapacity INT,
reportStatus TINYINT,
reportDateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=InnoDB DEFAULT CHARSET=utf8;