From 8ca3a062f31817e71443e2c4666adc42036ebcdc Mon Sep 17 00:00:00 2001 From: LeonZYang <407321952@qq.com> Date: Wed, 4 Jan 2017 10:47:21 +0800 Subject: [PATCH] add agent autoupdate table. --- db_schema/portal-db-schema.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/db_schema/portal-db-schema.sql b/db_schema/portal-db-schema.sql index cbf080a..e22805c 100644 --- a/db_schema/portal-db-schema.sql +++ b/db_schema/portal-db-schema.sql @@ -170,3 +170,18 @@ CREATE TABLE `cluster` ( `creator` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE =InnoDB; + +/** + * agent autoupdate table + */ +DROP TABLE IF EXISTS `agent_version`; +CREATE TABLE `agent_version` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `hostname` varchar(255) NOT NULL DEFAULT '', + `version` varchar(255) NOT NULL DEFAULT '', + `status` int(4) unsigned NOT NULL DEFAULT '0', + `current_version` varchar(255) NOT NULL DEFAULT '', + `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `idx_agent_hostname` (`hostname`) +) ENGINE=InnoDB;