github.com/polarismesh/polaris@v1.17.8/store/mysql/scripts/delta/v1_7_0-v1_8_0.sql (about) 1 /* 2 * Tencent is pleased to support the open source community by making Polaris available. 3 * 4 * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 5 * 6 * Licensed under the BSD 3-Clause License (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * https://opensource.org/licenses/BSD-3-Clause 11 * 12 * Unless required by applicable law or agreed to in writing, software distributed 13 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 14 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 15 * specific language governing permissions and limitations under the License. 16 */ 17 -- 18 -- Database: `polaris_server` 19 -- 20 CREATE 21 DATABASE IF NOT EXISTS `polaris_server` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; 22 23 USE 24 `polaris_server`; 25 26 CREATE TABLE `client` 27 ( 28 `id` VARCHAR(128) NOT NULL comment 'client id', 29 `host` VARCHAR(100) NOT NULL comment 'client host IP', 30 `type` VARCHAR(100) NOT NULL comment 'client type: polaris-java/polaris-go', 31 `version` VARCHAR(32) NOT NULL comment 'client SDK version', 32 `region` varchar(128) DEFAULT NULL comment 'region info for client', 33 `zone` varchar(128) DEFAULT NULL comment 'zone info for client', 34 `campus` varchar(128) DEFAULT NULL comment 'campus info for client', 35 `flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 is valid, 1 is invalid(deleted)', 36 `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP comment 'create time', 37 `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment 'last updated time', 38 PRIMARY KEY (`id`), 39 KEY `mtime` (`mtime`) 40 ) ENGINE = InnoDB; 41 42 CREATE TABLE `client_stat` 43 ( 44 `client_id` VARCHAR(128) NOT NULL comment 'client id', 45 `target` VARCHAR(100) NOT NULL comment 'target stat platform', 46 `port` int(11) NOT NULL comment 'client port to get stat information', 47 `protocol` VARCHAR(100) NOT NULL comment 'stat info transport protocol', 48 `path` VARCHAR(128) NOT NULL comment 'stat metric path', 49 PRIMARY KEY (`client_id`, `target`, `port`) 50 ) ENGINE = InnoDB;