nacos1.1.4 适配瀚高数据库

nacos 1.1.4

1.数据库准备

CREATE TABLE config_info (
     id bigserial NOT NULL,
     data_id varchar(255) NOT NULL,
     group_id varchar(128) NOT NULL,
     tenant_id varchar(128) default '',
     app_name varchar(128),
     content text,
     md5 varchar(32) DEFAULT NULL,
     gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
     gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
     src_user varchar(128) DEFAULT NULL,
     src_ip varchar(20) DEFAULT NULL,
     c_desc varchar(256) DEFAULT NULL,
     c_use varchar(64) DEFAULT NULL,
     effect varchar(64) DEFAULT NULL,
     type varchar(64) DEFAULT NULL,
     c_schema VARCHAR DEFAULT NULL,
     constraint configinfo_id_key PRIMARY KEY (id),
     constraint uk_configinfo_datagrouptenant UNIQUE (data_id,group_id,tenant_id));

CREATE INDEX configinfo_dataid_key_idx ON config_info(data_id);
CREATE INDEX configinfo_groupid_key_idx ON config_info(group_id);
CREATE INDEX configinfo_dataid_group_key_idx ON config_info(data_id, group_id);

CREATE TABLE his_config_info (
     id bigint NOT NULL,
     nid bigserial NOT NULL,
     data_id varchar(255) NOT NULL,
     group_id varchar(128) NOT NULL,
     tenant_id varchar(128) default '',
     app_name varchar(128),
     content text,
     md5 varchar(32) DEFAULT NULL,
     gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
     gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
     src_user varchar(128),
     src_ip varchar(20) DEFAULT NULL,
     op_type char(10) DEFAULT NULL,
     constraint hisconfiginfo_nid_key PRIMARY KEY (nid));

CREATE INDEX hisconfiginfo_dataid_key_idx ON his_config_info(data_id);
CREATE INDEX hisconfiginfo_gmt_create_idx ON his_config_info(gmt_create);
CREATE INDEX hisconfiginfo_gmt_modified_idx ON his_config_info(gmt_modified);


CREATE TABLE config_info_beta (
      id bigserial NOT NULL,
      data_id varchar(255) NOT NULL,
      group_id varchar(128) NOT NULL,
      tenant_id varchar(128) default '',
      app_name varchar(128),
      content text,
      beta_ips varchar(1024),
      md5 varchar(32) DEFAULT NULL,
      gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
      gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
      src_user varchar(128),
      src_ip varchar(20) DEFAULT NULL,
      constraint configinfobeta_id_key PRIMARY KEY (id),
      constraint uk_configinfobeta_datagrouptenant UNIQUE (data_id,group_id,tenant_id));

CREATE TABLE config_info_tag (
     id bigserial 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 text,
     md5 varchar(32) DEFAULT NULL,
     gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
     gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
     src_user varchar(128),
     src_ip varchar(20) DEFAULT NULL,
     constraint configinfotag_id_key PRIMARY KEY (id),
     constraint uk_configinfotag_datagrouptenanttag UNIQUE (data_id,group_id,tenant_id,tag_id));

CREATE TABLE config_info_aggr (
      id bigserial NOT NULL,
      data_id varchar(255) NOT NULL,
      group_id varchar(128) NOT NULL,
      tenant_id varchar(128) default '',
      datum_id varchar(255) NOT NULL,
      app_name varchar(128),
      content text,
      gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
      constraint configinfoaggr_id_key PRIMARY KEY (id),
      constraint uk_configinfoaggr_datagrouptenantdatum UNIQUE (data_id,group_id,tenant_id,datum_id));

CREATE TABLE app_list (
      id bigserial NOT NULL,
      app_name varchar(128) NOT NULL,
      is_dynamic_collect_disabled smallint DEFAULT 0,
      last_sub_info_collected_time timestamp DEFAULT '1970-01-01 08:00:00.0',
      sub_info_lock_owner varchar(128),
      sub_info_lock_time timestamp DEFAULT '1970-01-01 08:00:00.0',
      constraint applist_id_key PRIMARY KEY (id),
      constraint uk_appname UNIQUE (app_name));

CREATE TABLE app_configdata_relation_subs (
      id bigserial NOT NULL ,
      app_name varchar(128) NOT NULL,
      data_id varchar(255) NOT NULL,
      group_id varchar(128) NOT NULL,
      gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
      constraint configdatarelationsubs_id_key PRIMARY KEY (id),
      constraint uk_app_sub_config_datagroup UNIQUE (app_name, data_id, group_id));


CREATE TABLE app_configdata_relation_pubs (
      id bigserial NOT NULL ,
      app_name varchar(128) NOT NULL,
      data_id varchar(255)
  • 27
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值