CREATE TABLE IF NOT EXISTS `pkg`
(
    `id`                INTEGER PRIMARY KEY AUTOINCREMENT,
    `path`              TEXT,
    `installed`         INTEGER,
    `create_timestamp`  INTEGER,
    `install_timestamp` INTEGER
);

CREATE TABLE IF NOT EXISTS `patch`
(
    `id`                INTEGER PRIMARY KEY AUTOINCREMENT,
    `path`              TEXT,
    `verified`          INTEGER,
    `installed`         INTEGER,
    `create_timestamp`  INTEGER,
    `verify_timestamp`  INTEGER,
    `install_timestamp` INTEGER
);

-- 记录注册的机器的信息
CREATE TABLE IF NOT EXISTS `machine`
(
    `id`               INTEGER PRIMARY KEY AUTOINCREMENT,
    `uuid`             CHAR(32),
    `create_timestamp` INTEGER
);

-- 记录下发的指令
CREATE TABLE IF NOT EXISTS `action`
(
    `id`               INTEGER PRIMARY KEY AUTOINCREMENT,
    `uuid`             CHAR(32),
    `action`           INTEGER, -- 要下发的指令
    `create_timestamp` INTEGER  -- 下发命令的时间戳，秒为单位
);