diff --git a/store/sqldb/scripts/delta/v180-v1110.sql b/store/sqldb/scripts/delta/v180-v1110.sql deleted file mode 100644 index 95b1a191c..000000000 --- a/store/sqldb/scripts/delta/v180-v1110.sql +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Polaris available. - * - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ --- --- Database: `polaris_server` --- - -USE `polaris_server`; - -ALTER TABLE `ratelimit_config` CHANGE `cluster_id` `name` varchar(64) NOT NULL; -ALTER TABLE `ratelimit_config` ADD COLUMN `disable` tinyint(4) NOT NULL DEFAULT '0'; -ALTER TABLE `ratelimit_config` ADD COLUMN `etime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; -ALTER TABLE `ratelimit_config` ADD COLUMN `method` varchar(512) NOT NULL; \ No newline at end of file diff --git a/store/sqldb/scripts/delta/v160-v170.sql b/store/sqldb/scripts/delta/v1_6_0-v1_7_0.sql similarity index 100% rename from store/sqldb/scripts/delta/v160-v170.sql rename to store/sqldb/scripts/delta/v1_6_0-v1_7_0.sql diff --git a/store/sqldb/scripts/delta/v170-v180.sql b/store/sqldb/scripts/delta/v1_7_0-v1_8_0.sql similarity index 100% rename from store/sqldb/scripts/delta/v170-v180.sql rename to store/sqldb/scripts/delta/v1_7_0-v1_8_0.sql diff --git a/store/sqldb/scripts/delta/v180-v190.sql b/store/sqldb/scripts/delta/v1_8_0-v1_11_0.sql similarity index 59% rename from store/sqldb/scripts/delta/v180-v190.sql rename to store/sqldb/scripts/delta/v1_8_0-v1_11_0.sql index f1aa136ff..7beef6945 100644 --- a/store/sqldb/scripts/delta/v180-v190.sql +++ b/store/sqldb/scripts/delta/v1_8_0-v1_11_0.sql @@ -1,31 +1,45 @@ -/* - * Tencent is pleased to support the open source community by making Polaris available. - * - * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -CREATE TABLE `config_file_template` ( - `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', - `name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT '配置文件模板名称', - `content` longtext COLLATE utf8_bin NOT NULL COMMENT '配置文件模板内容', - `format` varchar(16) COLLATE utf8_bin DEFAULT 'text' COMMENT '模板文件格式', - `comment` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT '模板描述信息', - `flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '软删除标记位', - `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `create_by` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人', - `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', - `modify_by` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '最后更新人', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_name` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='配置文件模板表'; +/* + * Tencent is pleased to support the open source community by making Polaris available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * + * Licensed under the BSD 3-Clause License (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://opensource.org/licenses/BSD-3-Clause + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +-- +-- Database: `polaris_server` +-- + +USE `polaris_server`; + +ALTER TABLE `ratelimit_config` CHANGE `cluster_id` `name` varchar(64) NOT NULL; +ALTER TABLE `ratelimit_config` ADD COLUMN `disable` tinyint(4) NOT NULL DEFAULT '0'; +ALTER TABLE `ratelimit_config` ADD COLUMN `etime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; +ALTER TABLE `ratelimit_config` ADD COLUMN `method` varchar(512) NOT NULL; + + +CREATE TABLE `config_file_template` ( + `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', + `name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT '配置文件模板名称', + `content` longtext COLLATE utf8_bin NOT NULL COMMENT '配置文件模板内容', + `format` varchar(16) COLLATE utf8_bin DEFAULT 'text' COMMENT '模板文件格式', + `comment` varchar(512) COLLATE utf8_bin DEFAULT NULL COMMENT '模板描述信息', + `flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '软删除标记位', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `create_by` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人', + `modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', + `modify_by` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '最后更新人', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='配置文件模板表'; + + +INSERT INTO `config_file_template` (`id`,`name`,`content`,`format`,`comment`,`create_time`,`create_by`,`modify_time`,`modify_by`) VALUES (2,'spring-cloud-gateway-braining','{\n \"rules\":[\n {\n \"conditions\":[\n {\n \"key\":\"${http.query.uid}\",\n \"values\":[\n \"10000\"\n ],\n \"operation\":\"EQUALS\"\n }\n ],\n \"labels\":[\n {\n \"key\":\"env\",\n \"value\":\"green\"\n }\n ]\n }\n ]\n}','json','Spring Cloud Gateway 染色规则','2022-08-18 10:54:46','polaris','2022-08-18 10:55:22','polaris');