CREATE TABLE "NACOS"."CONFIG_INFO"
(
"ID" BIGINT IDENTITY(1, 1) NOT NULL,
"DATA_ID" VARCHAR(255) NOT NULL,
"GROUP_ID" VARCHAR(128),
"CONTENT" CLOB NOT NULL,
"MD5" VARCHAR(32),
"GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"SRC_USER" TEXT,
"SRC_IP" VARCHAR(50),
"APP_NAME" VARCHAR(128),
"TENANT_ID" VARCHAR(128) DEFAULT '',
"C_DESC" VARCHAR(256),
"C_USE" VARCHAR(64),
"EFFECT" VARCHAR(64),
"TYPE" VARCHAR(64),
"C_SCHEMA" TEXT,
"ENCRYPTED_DATA_KEY" TEXT NOT NULL,
NOT CLUSTER PRIMARY KEY("ID"),
CONSTRAINT "UK_CONFIGINFO_DATAGROUPTENANT" UNIQUE("DATA_ID", "GROUP_ID", "TENANT_ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."CONFIG_INFO" IS 'config_info';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."CONTENT" IS 'content';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."DATA_ID" IS 'data_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."ENCRYPTED_DATA_KEY" IS '密钥';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."GMT_CREATE" IS '创建时间';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."GMT_MODIFIED" IS '修改时间';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."ID" IS 'id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."MD5" IS 'md5';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."SRC_IP" IS 'source ip';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."SRC_USER" IS 'source user';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO"."TENANT_ID" IS '租户字段';


CREATE TABLE "NACOS"."CONFIG_INFO_AGGR"
(
"ID" BIGINT IDENTITY(1, 1) NOT NULL,
"DATA_ID" VARCHAR(255) NOT NULL,
"GROUP_ID" VARCHAR(128) NOT NULL,
"DATUM_ID" VARCHAR(255) NOT NULL,
"CONTENT" CLOB NOT NULL,
"GMT_MODIFIED" TIMESTAMP(0) NOT NULL,
"APP_NAME" VARCHAR(128),
"TENANT_ID" VARCHAR(128) DEFAULT '',
NOT CLUSTER PRIMARY KEY("ID"),
CONSTRAINT "UK_CONFIGINFOAGGR_DATAGROUPTENANTDATUM" UNIQUE("DATA_ID", "GROUP_ID", "TENANT_ID", "DATUM_ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."CONFIG_INFO_AGGR" IS '增加租户字段';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."CONTENT" IS '内容';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."DATA_ID" IS 'data_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."DATUM_ID" IS 'datum_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."GMT_MODIFIED" IS '修改时间';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."GROUP_ID" IS 'group_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."ID" IS 'id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_AGGR"."TENANT_ID" IS '租户字段';


CREATE TABLE "NACOS"."CONFIG_INFO_BETA"
(
"ID" BIGINT IDENTITY(1, 1) NOT NULL,
"DATA_ID" VARCHAR(255) NOT NULL,
"GROUP_ID" VARCHAR(128) NOT NULL,
"APP_NAME" VARCHAR(128),
"CONTENT" CLOB NOT NULL,
"BETA_IPS" VARCHAR(1024),
"MD5" VARCHAR(32),
"GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"SRC_USER" TEXT,
"SRC_IP" VARCHAR(50),
"TENANT_ID" VARCHAR(128) DEFAULT '',
"ENCRYPTED_DATA_KEY" TEXT NOT NULL,
NOT CLUSTER PRIMARY KEY("ID"),
CONSTRAINT "UK_CONFIGINFOBETA_DATAGROUPTENANT" UNIQUE("DATA_ID", "GROUP_ID", "TENANT_ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."CONFIG_INFO_BETA" IS 'config_info_beta';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."APP_NAME" IS 'app_name';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."BETA_IPS" IS 'betaIps';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."CONTENT" IS 'content';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."DATA_ID" IS 'data_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."ENCRYPTED_DATA_KEY" IS '密钥';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."GMT_CREATE" IS '创建时间';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."GMT_MODIFIED" IS '修改时间';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."GROUP_ID" IS 'group_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."ID" IS 'id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."MD5" IS 'md5';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."SRC_IP" IS 'source ip';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."SRC_USER" IS 'source user';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_BETA"."TENANT_ID" IS '租户字段';


CREATE TABLE "NACOS"."CONFIG_INFO_TAG"
(
"ID" BIGINT IDENTITY(1, 1) NOT NULL,
"DATA_ID" VARCHAR(255) NOT NULL,
"GROUP_ID" VARCHAR(128) NOT NULL,
"TENANT_ID" VARCHAR(128) DEFAULT '',
"TAG_ID" VARCHAR(128) NOT NULL,
"APP_NAME" VARCHAR(128),
"CONTENT" CLOB NOT NULL,
"MD5" VARCHAR(32),
"GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"SRC_USER" TEXT,
"SRC_IP" VARCHAR(50),
NOT CLUSTER PRIMARY KEY("ID"),
CONSTRAINT "UK_CONFIGINFOTAG_DATAGROUPTENANTTAG" UNIQUE("DATA_ID", "GROUP_ID", "TENANT_ID", "TAG_ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."CONFIG_INFO_TAG" IS 'config_info_tag';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."APP_NAME" IS 'app_name';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."CONTENT" IS 'content';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."DATA_ID" IS 'data_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."GMT_CREATE" IS '创建时间';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."GMT_MODIFIED" IS '修改时间';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."GROUP_ID" IS 'group_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."ID" IS 'id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."MD5" IS 'md5';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."SRC_IP" IS 'source ip';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."SRC_USER" IS 'source user';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."TAG_ID" IS 'tag_id';
COMMENT ON COLUMN "NACOS"."CONFIG_INFO_TAG"."TENANT_ID" IS 'tenant_id';


CREATE TABLE "NACOS"."CONFIG_TAGS_RELATION"
(
"ID" BIGINT NOT NULL,
"TAG_NAME" VARCHAR(128) NOT NULL,
"TAG_TYPE" VARCHAR(64),
"DATA_ID" VARCHAR(255) NOT NULL,
"GROUP_ID" VARCHAR(128) NOT NULL,
"TENANT_ID" VARCHAR(128) DEFAULT '',
"NID" BIGINT IDENTITY(1, 1) NOT NULL,
NOT CLUSTER PRIMARY KEY("NID"),
CONSTRAINT "UK_CONFIGTAGRELATION_CONFIGIDTAG" UNIQUE("ID", "TAG_NAME", "TAG_TYPE")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."CONFIG_TAGS_RELATION" IS 'config_tag_relation';
COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."DATA_ID" IS 'data_id';
COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."GROUP_ID" IS 'group_id';
COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."ID" IS 'id';
COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."TAG_NAME" IS 'tag_name';
COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."TAG_TYPE" IS 'tag_type';
COMMENT ON COLUMN "NACOS"."CONFIG_TAGS_RELATION"."TENANT_ID" IS 'tenant_id';


CREATE TABLE "NACOS"."GROUP_CAPACITY"
(
"ID" BIGINT IDENTITY(1, 1) NOT NULL,
"GROUP_ID" VARCHAR(128) DEFAULT '' NOT NULL,
"QUOTA" BIGINT DEFAULT 0 NOT NULL,
"USAGE" BIGINT DEFAULT 0 NOT NULL,
"MAX_SIZE" BIGINT DEFAULT 0 NOT NULL,
"MAX_AGGR_COUNT" BIGINT DEFAULT 0 NOT NULL,
"MAX_AGGR_SIZE" BIGINT DEFAULT 0 NOT NULL,
"MAX_HISTORY_COUNT" BIGINT DEFAULT 0 NOT NULL,
"GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
NOT CLUSTER PRIMARY KEY("ID"),
CONSTRAINT "UK_GROUP_ID" UNIQUE("GROUP_ID"),
CHECK("QUOTA" >= 0)
,CHECK("MAX_HISTORY_COUNT" >= 0)
,CHECK("MAX_AGGR_SIZE" >= 0)
,CHECK("MAX_AGGR_COUNT" >= 0)
,CHECK("MAX_SIZE" >= 0)
,CHECK("USAGE" >= 0)) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."GROUP_CAPACITY" IS '集群、各Group容量信息表';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."GMT_CREATE" IS '创建时间';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."GMT_MODIFIED" IS '修改时间';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."GROUP_ID" IS 'Group ID，空字符表示整个集群';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."ID" IS '主键ID';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_AGGR_COUNT" IS '聚合子配置最大个数，，0表示使用默认值';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_AGGR_SIZE" IS '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_HISTORY_COUNT" IS '最大变更历史数量';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."MAX_SIZE" IS '单个配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."QUOTA" IS '配额，0表示使用默认值';
COMMENT ON COLUMN "NACOS"."GROUP_CAPACITY"."USAGE" IS '使用量';


CREATE TABLE "NACOS"."HIS_CONFIG_INFO"
(
"ID" DECIMAL(20,0) NOT NULL,
"NID" BIGINT IDENTITY(1, 1) NOT NULL,
"DATA_ID" VARCHAR(255) NOT NULL,
"GROUP_ID" VARCHAR(128) NOT NULL,
"APP_NAME" VARCHAR(128),
"CONTENT" CLOB NOT NULL,
"MD5" VARCHAR(32),
"GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"SRC_USER" TEXT,
"SRC_IP" VARCHAR(50),
"OP_TYPE" CHAR(10),
"TENANT_ID" VARCHAR(128) DEFAULT '',
"ENCRYPTED_DATA_KEY" TEXT NOT NULL,
NOT CLUSTER PRIMARY KEY("NID"),
CHECK("ID" >= 0)) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."HIS_CONFIG_INFO" IS '多租户改造';
COMMENT ON COLUMN "NACOS"."HIS_CONFIG_INFO"."APP_NAME" IS 'app_name';
COMMENT ON COLUMN "NACOS"."HIS_CONFIG_INFO"."ENCRYPTED_DATA_KEY" IS '密钥';
COMMENT ON COLUMN "NACOS"."HIS_CONFIG_INFO"."TENANT_ID" IS '租户字段';


CREATE OR REPLACE  INDEX "IDX_GMT_MODIFIED" ON "NACOS"."HIS_CONFIG_INFO"("GMT_MODIFIED" ASC) STORAGE(ON "MAIN", CLUSTERBTR) ;
CREATE OR REPLACE  INDEX "IDX_GMT_CREATE" ON "NACOS"."HIS_CONFIG_INFO"("GMT_CREATE" ASC) STORAGE(ON "MAIN", CLUSTERBTR) ;
CREATE OR REPLACE  INDEX "IDX_DID" ON "NACOS"."HIS_CONFIG_INFO"("DATA_ID" ASC) STORAGE(ON "MAIN", CLUSTERBTR) ;

CREATE TABLE "NACOS"."PERMISSIONS"
(
"ROLE" VARCHAR(50) NOT NULL,
"RESOURCE" VARCHAR(255) NOT NULL,
"ACTION" VARCHAR(8) NOT NULL,
CONSTRAINT "UK_ROLE_PERMISSION" UNIQUE("ROLE", "RESOURCE", "ACTION")) STORAGE(ON "MAIN", CLUSTERBTR) ;

CREATE TABLE "NACOS"."ROLES"
(
"USERNAME" VARCHAR(50) NOT NULL,
"ROLE" VARCHAR(50) NOT NULL,
CONSTRAINT "IDX_USER_ROLE" UNIQUE("USERNAME", "ROLE")) STORAGE(ON "MAIN", CLUSTERBTR) ;

CREATE TABLE "NACOS"."TENANT_CAPACITY"
(
"ID" BIGINT IDENTITY(1, 1) NOT NULL,
"TENANT_ID" VARCHAR(128) DEFAULT '' NOT NULL,
"QUOTA" BIGINT DEFAULT 0 NOT NULL,
"USAGE" BIGINT DEFAULT 0 NOT NULL,
"MAX_SIZE" BIGINT DEFAULT 0 NOT NULL,
"MAX_AGGR_COUNT" BIGINT DEFAULT 0 NOT NULL,
"MAX_AGGR_SIZE" BIGINT DEFAULT 0 NOT NULL,
"MAX_HISTORY_COUNT" BIGINT DEFAULT 0 NOT NULL,
"GMT_CREATE" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
"GMT_MODIFIED" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
NOT CLUSTER PRIMARY KEY("ID"),
CONSTRAINT "UK_TENANT_ID" UNIQUE("TENANT_ID"),
CHECK("QUOTA" >= 0)
,CHECK("MAX_HISTORY_COUNT" >= 0)
,CHECK("MAX_AGGR_SIZE" >= 0)
,CHECK("MAX_AGGR_COUNT" >= 0)
,CHECK("MAX_SIZE" >= 0)
,CHECK("USAGE" >= 0)) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."TENANT_CAPACITY" IS '租户容量信息表';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."GMT_CREATE" IS '创建时间';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."GMT_MODIFIED" IS '修改时间';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."ID" IS '主键ID';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_AGGR_COUNT" IS '聚合子配置最大个数';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_AGGR_SIZE" IS '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_HISTORY_COUNT" IS '最大变更历史数量';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."MAX_SIZE" IS '单个配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."QUOTA" IS '配额，0表示使用默认值';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."TENANT_ID" IS 'Tenant ID';
COMMENT ON COLUMN "NACOS"."TENANT_CAPACITY"."USAGE" IS '使用量';


CREATE TABLE "NACOS"."TENANT_INFO"
(
"ID" BIGINT IDENTITY(1, 1) NOT NULL,
"KP" VARCHAR(128) NOT NULL,
"TENANT_ID" VARCHAR(128) DEFAULT '',
"TENANT_NAME" VARCHAR(128) DEFAULT '',
"TENANT_DESC" VARCHAR(256),
"CREATE_SOURCE" VARCHAR(32),
"GMT_CREATE" BIGINT NOT NULL,
"GMT_MODIFIED" BIGINT NOT NULL,
NOT CLUSTER PRIMARY KEY("ID"),
CONSTRAINT "UK_TENANT_INFO_KPTENANTID" UNIQUE("KP", "TENANT_ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "NACOS"."TENANT_INFO" IS 'tenant_info';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."CREATE_SOURCE" IS 'create_source';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."GMT_CREATE" IS '创建时间';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."GMT_MODIFIED" IS '修改时间';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."ID" IS 'id';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."KP" IS 'kp';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."TENANT_DESC" IS 'tenant_desc';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."TENANT_ID" IS 'tenant_id';
COMMENT ON COLUMN "NACOS"."TENANT_INFO"."TENANT_NAME" IS 'tenant_name';


CREATE OR REPLACE  INDEX "IDX_TENANT_ID" ON "NACOS"."TENANT_INFO"("TENANT_ID" ASC) STORAGE(ON "MAIN", CLUSTERBTR) ;

CREATE TABLE "NACOS"."USERS"
(
"USERNAME" VARCHAR(50) NOT NULL,
"PASSWORD" VARCHAR(500) NOT NULL,
"ENABLED" TINYINT NOT NULL,
NOT CLUSTER PRIMARY KEY("USERNAME")) STORAGE(ON "MAIN", CLUSTERBTR) ;




insert into "NACOS"."CONFIG_INFO"("ID", "DATA_ID", "GROUP_ID", "CONTENT", "MD5", "GMT_CREATE", "GMT_MODIFIED", "SRC_USER", "SRC_IP", "APP_NAME", "TENANT_ID", "C_DESC", "C_USE", "EFFECT", "TYPE", "C_SCHEMA", "ENCRYPTED_DATA_KEY") 
VALUES(<"ID", BIGINT>, <"DATA_ID", VARCHAR(255)>, <"GROUP_ID", VARCHAR(128)>, <"CONTENT", CLOB>, <"MD5", VARCHAR(32)>, <"GMT_CREATE", TIMESTAMP(0)>, <"GMT_MODIFIED", TIMESTAMP(0)>, <"SRC_USER", TEXT>, <"SRC_IP", VARCHAR(50)>, <"APP_NAME", VARCHAR(128)>, <"TENANT_ID", VARCHAR(128)>, <"C_DESC", VARCHAR(256)>, <"C_USE", VARCHAR(64)>, <"EFFECT", VARCHAR(64)>, <"TYPE", VARCHAR(64)>, <"C_SCHEMA", TEXT>, <"ENCRYPTED_DATA_KEY", TEXT>);

insert into "NACOS"."CONFIG_INFO_AGGR"("ID", "DATA_ID", "GROUP_ID", "DATUM_ID", "CONTENT", "GMT_MODIFIED", "APP_NAME", "TENANT_ID") 
VALUES(<"ID", BIGINT>, <"DATA_ID", VARCHAR(255)>, <"GROUP_ID", VARCHAR(128)>, <"DATUM_ID", VARCHAR(255)>, <"CONTENT", CLOB>, <"GMT_MODIFIED", TIMESTAMP(0)>, <"APP_NAME", VARCHAR(128)>, <"TENANT_ID", VARCHAR(128)>);

insert into "NACOS"."CONFIG_INFO_BETA"("ID", "DATA_ID", "GROUP_ID", "APP_NAME", "CONTENT", "BETA_IPS", "MD5", "GMT_CREATE", "GMT_MODIFIED", "SRC_USER", "SRC_IP", "TENANT_ID", "ENCRYPTED_DATA_KEY") 
VALUES(<"ID", BIGINT>, <"DATA_ID", VARCHAR(255)>, <"GROUP_ID", VARCHAR(128)>, <"APP_NAME", VARCHAR(128)>, <"CONTENT", CLOB>, <"BETA_IPS", VARCHAR(1024)>, <"MD5", VARCHAR(32)>, <"GMT_CREATE", TIMESTAMP(0)>, <"GMT_MODIFIED", TIMESTAMP(0)>, <"SRC_USER", TEXT>, <"SRC_IP", VARCHAR(50)>, <"TENANT_ID", VARCHAR(128)>, <"ENCRYPTED_DATA_KEY", TEXT>);

insert into "NACOS"."CONFIG_INFO_TAG"("ID", "DATA_ID", "GROUP_ID", "TENANT_ID", "TAG_ID", "APP_NAME", "CONTENT", "MD5", "GMT_CREATE", "GMT_MODIFIED", "SRC_USER", "SRC_IP") 
VALUES(<"ID", BIGINT>, <"DATA_ID", VARCHAR(255)>, <"GROUP_ID", VARCHAR(128)>, <"TENANT_ID", VARCHAR(128)>, <"TAG_ID", VARCHAR(128)>, <"APP_NAME", VARCHAR(128)>, <"CONTENT", CLOB>, <"MD5", VARCHAR(32)>, <"GMT_CREATE", TIMESTAMP(0)>, <"GMT_MODIFIED", TIMESTAMP(0)>, <"SRC_USER", TEXT>, <"SRC_IP", VARCHAR(50)>);

insert into "NACOS"."CONFIG_TAGS_RELATION"("ID", "TAG_NAME", "TAG_TYPE", "DATA_ID", "GROUP_ID", "TENANT_ID", "NID") 
VALUES(<"ID", BIGINT>, <"TAG_NAME", VARCHAR(128)>, <"TAG_TYPE", VARCHAR(64)>, <"DATA_ID", VARCHAR(255)>, <"GROUP_ID", VARCHAR(128)>, <"TENANT_ID", VARCHAR(128)>, <"NID", BIGINT>);

insert into "NACOS"."GROUP_CAPACITY"("ID", "GROUP_ID", "QUOTA", "USAGE", "MAX_SIZE", "MAX_AGGR_COUNT", "MAX_AGGR_SIZE", "MAX_HISTORY_COUNT", "GMT_CREATE", "GMT_MODIFIED") 
VALUES(<"ID", BIGINT>, <"GROUP_ID", VARCHAR(128)>, <"QUOTA", BIGINT>, <"USAGE", BIGINT>, <"MAX_SIZE", BIGINT>, <"MAX_AGGR_COUNT", BIGINT>, <"MAX_AGGR_SIZE", BIGINT>, <"MAX_HISTORY_COUNT", BIGINT>, <"GMT_CREATE", TIMESTAMP(0)>, <"GMT_MODIFIED", TIMESTAMP(0)>);

insert into "NACOS"."HIS_CONFIG_INFO"("ID", "NID", "DATA_ID", "GROUP_ID", "APP_NAME", "CONTENT", "MD5", "GMT_CREATE", "GMT_MODIFIED", "SRC_USER", "SRC_IP", "OP_TYPE", "TENANT_ID", "ENCRYPTED_DATA_KEY") 
VALUES(<"ID", DECIMAL(20, 0)>, <"NID", BIGINT>, <"DATA_ID", VARCHAR(255)>, <"GROUP_ID", VARCHAR(128)>, <"APP_NAME", VARCHAR(128)>, <"CONTENT", CLOB>, <"MD5", VARCHAR(32)>, <"GMT_CREATE", TIMESTAMP(0)>, <"GMT_MODIFIED", TIMESTAMP(0)>, <"SRC_USER", TEXT>, <"SRC_IP", VARCHAR(50)>, <"OP_TYPE", CHAR(10)>, <"TENANT_ID", VARCHAR(128)>, <"ENCRYPTED_DATA_KEY", TEXT>);

insert into "NACOS"."PERMISSIONS"("ROLE", "RESOURCE", "ACTION") 
VALUES(<"ROLE", VARCHAR(50)>, <"RESOURCE", VARCHAR(255)>, <"ACTION", VARCHAR(8)>);

insert into "NACOS"."ROLES"("USERNAME", "ROLE") 
VALUES(<"USERNAME", VARCHAR(50)>, <"ROLE", VARCHAR(50)>);

insert into "NACOS"."TENANT_CAPACITY"("ID", "TENANT_ID", "QUOTA", "USAGE", "MAX_SIZE", "MAX_AGGR_COUNT", "MAX_AGGR_SIZE", "MAX_HISTORY_COUNT", "GMT_CREATE", "GMT_MODIFIED") 
VALUES(<"ID", BIGINT>, <"TENANT_ID", VARCHAR(128)>, <"QUOTA", BIGINT>, <"USAGE", BIGINT>, <"MAX_SIZE", BIGINT>, <"MAX_AGGR_COUNT", BIGINT>, <"MAX_AGGR_SIZE", BIGINT>, <"MAX_HISTORY_COUNT", BIGINT>, <"GMT_CREATE", TIMESTAMP(0)>, <"GMT_MODIFIED", TIMESTAMP(0)>);

insert into "NACOS"."TENANT_INFO"("ID", "KP", "TENANT_ID", "TENANT_NAME", "TENANT_DESC", "CREATE_SOURCE", "GMT_CREATE", "GMT_MODIFIED") 
VALUES(<"ID", BIGINT>, <"KP", VARCHAR(128)>, <"TENANT_ID", VARCHAR(128)>, <"TENANT_NAME", VARCHAR(128)>, <"TENANT_DESC", VARCHAR(256)>, <"CREATE_SOURCE", VARCHAR(32)>, <"GMT_CREATE", BIGINT>, <"GMT_MODIFIED", BIGINT>);

insert into "NACOS"."USERS"("USERNAME", "PASSWORD", "ENABLED") 
VALUES(<"USERNAME", VARCHAR(50)>, <"PASSWORD", VARCHAR(500)>, <"ENABLED", TINYINT>);

