This is an automated email from the ASF dual-hosted git repository.
hefengen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new c275a948a fix sql (#4743)
c275a948a is described below
commit c275a948a0dd6f004866c92fac52098e0e8fa033
Author: Misaya295 <[email protected]>
AuthorDate: Fri Jun 30 09:32:06 2023 +0800
fix sql (#4743)
* fix sql
* Update pg.sql
* Update create-table.sql
---------
Co-authored-by: dragon-zhang <[email protected]>
Co-authored-by: likeguo <[email protected]>
---
db/init/oracle/schema.sql | 31 +++++++++++++++++++++++
db/init/pg/create-table.sql | 61 +++++++++++----------------------------------
2 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/db/init/oracle/schema.sql b/db/init/oracle/schema.sql
index 7f5bbaa59..62de126ac 100644
--- a/db/init/oracle/schema.sql
+++ b/db/init/oracle/schema.sql
@@ -2364,4 +2364,35 @@ comment on column PROXY_SELECTOR.props
comment on column PROXY_SELECTOR.date_created
is 'create time';
comment on column PROXY_SELECTOR.date_updated
+ is 'update time';
+
+create table alert_template
+(
+ id varchar(128) not null,
+ name varchar(255) not null,
+ strategy_name varchar(255) not null,
+ content varchar(1000) not null,
+ date_created timestamp(3) default SYSDATE not null,
+ date_updated timestamp(3) default SYSDATE not null,
+ PRIMARY KEY (id)
+)
+;
+-- Add comments to the columns
+comment
+on column ALTER_TEMPLATE.id
+ is 'primary key id';
+comment
+on column ALTER_TEMPLATE.name
+ is 'alert template name';
+comment
+on column ALTER_TEMPLATE.strategy_name
+ is 'alert template strategy name';
+comment
+on column ALTER_TEMPLATE.content
+ is 'alert template content';
+comment
+on column ALTER_TEMPLATE.date_created
+ is 'create time';
+comment
+on column ALTER_TEMPLATE.date_updated
is 'update time';
\ No newline at end of file
diff --git a/db/init/pg/create-table.sql b/db/init/pg/create-table.sql
index ad0f90c88..145b01091 100644
--- a/db/init/pg/create-table.sql
+++ b/db/init/pg/create-table.sql
@@ -2273,53 +2273,22 @@ COMMENT ON COLUMN
"public"."discovery_rel"."selector_id" IS 'the selector id';
COMMENT ON COLUMN "public"."discovery_rel"."proxy_selector_id" IS 'the proxy
selector id';
COMMENT ON COLUMN "public"."discovery_rel"."date_created" IS 'create time';
COMMENT ON COLUMN "public"."discovery_rel"."date_updated" IS 'update time';
-
--- ----------------------------
--- Table structure for discovery_upstream
--- ----------------------------
-DROP TABLE IF EXISTS "public"."discovery_upstream";
-CREATE TABLE "public"."discovery_upstream" (
- "id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
- "discovery_handler_id" varchar(128) COLLATE "pg_catalog"."default" NOT
NULL,
- "protocol" varchar(64) COLLATE "pg_catalog"."default",
- "url" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
- "status" int4 NOT NULL,
- "weight" int4 NOT NULL,
- "props" text COLLATE "pg_catalog"."default",
- "date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text,
(now())::timestamp(0) without time zone),
- "date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text,
(now())::timestamp(0) without time zone)
-)
-;
-COMMENT ON COLUMN "public"."discovery_upstream"."id" IS 'primary key id';
-COMMENT ON COLUMN "public"."discovery_upstream"."discovery_handler_id" IS 'the
discovery handler id';
-COMMENT ON COLUMN "public"."discovery_upstream"."protocol" IS 'for http,
https, tcp, ws';
-COMMENT ON COLUMN "public"."discovery_upstream"."url" IS 'ip:port';
-COMMENT ON COLUMN "public"."discovery_upstream"."status" IS 'type (0, healthy,
1 unhealthy)';
-COMMENT ON COLUMN "public"."discovery_upstream"."weight" IS 'the weight for
lists';
-COMMENT ON COLUMN "public"."discovery_upstream"."props" IS 'the discovery pops
(json) ';
-COMMENT ON COLUMN "public"."discovery_upstream"."date_created" IS 'create
time';
-COMMENT ON COLUMN "public"."discovery_upstream"."date_updated" IS 'update
time';
-
-- ----------------------------
--- Table structure for proxy_selector
+-- Table structure for alert_template
-- ----------------------------
-DROP TABLE IF EXISTS "public"."proxy_selector";
-CREATE TABLE "public"."proxy_selector" (
- "id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
- "name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
- "plugin_name" varchar(255) COLLATE "pg_catalog"."default",
- "type" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
- "forward_port" int4 NOT NULL,
- "props" text COLLATE "pg_catalog"."default",
- "date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text,
(now())::timestamp(0) without time zone),
- "date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text,
(now())::timestamp(0) without time zone)
+DROP TABLE IF EXISTS "public"."alert_template";
+CREATE TABLE "public"."alert_template" (
+ "id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
+ "name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
+ "strategy_name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
+ "content" varchar(1000) COLLATE "pg_catalog"."default" NOT NULL,
+ "date_created" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text,
(now())::timestamp(0) without time zone),
+ "date_updated" timestamp(6) NOT NULL DEFAULT timezone('UTC-8'::text,
(now())::timestamp(0) without time zone)
)
;
-COMMENT ON COLUMN "public"."proxy_selector"."id" IS 'primary key id';
-COMMENT ON COLUMN "public"."proxy_selector"."name" IS 'the proxy name';
-COMMENT ON COLUMN "public"."proxy_selector"."plugin_name" IS 'the plugin name';
-COMMENT ON COLUMN "public"."proxy_selector"."type" IS 'proxy type for tcp,
upd, ws';
-COMMENT ON COLUMN "public"."proxy_selector"."forward_port" IS 'the proxy
forward port';
-COMMENT ON COLUMN "public"."proxy_selector"."props" IS 'the discovery pops
(json) ';
-COMMENT ON COLUMN "public"."proxy_selector"."date_created" IS 'create time';
-COMMENT ON COLUMN "public"."proxy_selector"."date_updated" IS 'update time';
\ No newline at end of file
+COMMENT ON COLUMN "public"."alert_template"."id" IS 'primary key id';
+COMMENT ON COLUMN "public"."alert_template"."name" IS 'alert template name';
+COMMENT ON COLUMN "public"."alert_template"."strategy_name" IS 'alert template
strategy name';
+COMMENT ON COLUMN "public"."alert_template"."content" IS 'alert template
content';
+COMMENT ON COLUMN "public"."alert_template"."date_created" IS 'create time';
+COMMENT ON COLUMN "public"."alert_template"."date_updated" IS 'update time';