DatabasesInfo

CREATE TABLE activation (
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
code varchar(20) NOT NULL,
puid varchar(20) NOT NULL,
current varchar(10) NOT NULL,
createTime datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
updateTime datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE UNIQUE INDEX index_code_activation ON activation (code);
CREATE INDEX index_puid_activation ON activation (puid);

select * from activation;
+—-+—————–+—————–+———+———————+———————+
| id | code | puid | current | createTime | updateTime |
+—-+—————–+—————–+———+———————+———————+
| 8 | 111111111111 | QS5509-FOTATEST | v1A73 | 2018-11-30 15:08:24 | 2018-11-30 15:08:24 |
| 12 | 123456789012345 | QS5509A | v1A74 | 2018-11-30 15:08:24 | 2018-11-30 15:08:24 |
| 13 | 123456789123456 | QS5509A | v1A73 | 2018-11-30 15:08:24 | 2018-11-30 15:08:24 |
| 14 | 144444444444449 | QS5509A | v1A73 | 2018-11-30 15:08:24 | 2018-11-30 15:08:24 |
+—-+—————–+—————–+———+———————+———————+