nacos-pg.sql 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. /*
  2. * Copyright 1999-2018 Alibaba Group Holding Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. -- ----------------------------
  17. -- Table structure for config_info
  18. -- ----------------------------
  19. DROP TABLE IF EXISTS "config_info";
  20. CREATE TABLE "config_info"
  21. (
  22. "id" bigserial NOT NULL,
  23. "data_id" varchar(255) NOT NULL,
  24. "group_id" varchar(255),
  25. "content" text NOT NULL,
  26. "md5" varchar(32),
  27. "gmt_create" timestamp(6) NOT NULL,
  28. "gmt_modified" timestamp(6) NOT NULL,
  29. "src_user" text,
  30. "src_ip" varchar(20),
  31. "app_name" varchar(128),
  32. "tenant_id" varchar(128),
  33. "c_desc" varchar(256),
  34. "c_use" varchar(64),
  35. "effect" varchar(64),
  36. "type" varchar(64),
  37. "c_schema" text,
  38. "encrypted_data_key" text NOT NULL
  39. )
  40. ;
  41. COMMENT ON COLUMN "config_info"."id" IS 'id';
  42. COMMENT ON COLUMN "config_info"."data_id" IS 'data_id';
  43. COMMENT ON COLUMN "config_info"."content" IS 'content';
  44. COMMENT ON COLUMN "config_info"."md5" IS 'md5';
  45. COMMENT ON COLUMN "config_info"."gmt_create" IS '创建时间';
  46. COMMENT ON COLUMN "config_info"."gmt_modified" IS '修改时间';
  47. COMMENT ON COLUMN "config_info"."src_user" IS 'source user';
  48. COMMENT ON COLUMN "config_info"."src_ip" IS 'source ip';
  49. COMMENT ON COLUMN "config_info"."tenant_id" IS '租户字段';
  50. COMMENT ON COLUMN "config_info"."encrypted_data_key" IS '秘钥';
  51. COMMENT ON TABLE "config_info" IS 'config_info';
  52. -- ----------------------------
  53. -- Table structure for config_info_aggr
  54. -- ----------------------------
  55. DROP TABLE IF EXISTS "config_info_aggr";
  56. CREATE TABLE "config_info_aggr"
  57. (
  58. "id" bigserial NOT NULL,
  59. "data_id" varchar(255) NOT NULL,
  60. "group_id" varchar(255) NOT NULL,
  61. "datum_id" varchar(255) NOT NULL,
  62. "content" text NOT NULL,
  63. "gmt_modified" timestamp(6) NOT NULL,
  64. "app_name" varchar(128),
  65. "tenant_id" varchar(128)
  66. )
  67. ;
  68. COMMENT ON COLUMN "config_info_aggr"."id" IS 'id';
  69. COMMENT ON COLUMN "config_info_aggr"."data_id" IS 'data_id';
  70. COMMENT ON COLUMN "config_info_aggr"."group_id" IS 'group_id';
  71. COMMENT ON COLUMN "config_info_aggr"."datum_id" IS 'datum_id';
  72. COMMENT ON COLUMN "config_info_aggr"."content" IS '内容';
  73. COMMENT ON COLUMN "config_info_aggr"."gmt_modified" IS '修改时间';
  74. COMMENT ON COLUMN "config_info_aggr"."tenant_id" IS '租户字段';
  75. COMMENT ON TABLE "config_info_aggr" IS '增加租户字段';
  76. -- ----------------------------
  77. -- Records of config_info_aggr
  78. -- ----------------------------
  79. BEGIN;
  80. COMMIT;
  81. -- ----------------------------
  82. -- Table structure for config_info_beta
  83. -- ----------------------------
  84. DROP TABLE IF EXISTS "config_info_beta";
  85. CREATE TABLE "config_info_beta"
  86. (
  87. "id" bigserial NOT NULL,
  88. "data_id" varchar(255) NOT NULL,
  89. "group_id" varchar(128) NOT NULL,
  90. "app_name" varchar(128),
  91. "content" text NOT NULL,
  92. "beta_ips" varchar(1024),
  93. "md5" varchar(32),
  94. "gmt_create" timestamp(6) NOT NULL,
  95. "gmt_modified" timestamp(6) NOT NULL,
  96. "src_user" text,
  97. "src_ip" varchar(20),
  98. "tenant_id" varchar(128),
  99. "encrypted_data_key" text NOT NULL
  100. )
  101. ;
  102. COMMENT ON COLUMN "config_info_beta"."id" IS 'id';
  103. COMMENT ON COLUMN "config_info_beta"."data_id" IS 'data_id';
  104. COMMENT ON COLUMN "config_info_beta"."group_id" IS 'group_id';
  105. COMMENT ON COLUMN "config_info_beta"."app_name" IS 'app_name';
  106. COMMENT ON COLUMN "config_info_beta"."content" IS 'content';
  107. COMMENT ON COLUMN "config_info_beta"."beta_ips" IS 'betaIps';
  108. COMMENT ON COLUMN "config_info_beta"."md5" IS 'md5';
  109. COMMENT ON COLUMN "config_info_beta"."gmt_create" IS '创建时间';
  110. COMMENT ON COLUMN "config_info_beta"."gmt_modified" IS '修改时间';
  111. COMMENT ON COLUMN "config_info_beta"."src_user" IS 'source user';
  112. COMMENT ON COLUMN "config_info_beta"."src_ip" IS 'source ip';
  113. COMMENT ON COLUMN "config_info_beta"."tenant_id" IS '租户字段';
  114. COMMENT ON COLUMN "config_info_beta"."encrypted_data_key" IS '秘钥';
  115. COMMENT ON TABLE "config_info_beta" IS 'config_info_beta';
  116. -- ----------------------------
  117. -- Records of config_info_beta
  118. -- ----------------------------
  119. BEGIN;
  120. COMMIT;
  121. -- ----------------------------
  122. -- Table structure for config_info_tag
  123. -- ----------------------------
  124. DROP TABLE IF EXISTS "config_info_tag";
  125. CREATE TABLE "config_info_tag"
  126. (
  127. "id" bigserial NOT NULL,
  128. "data_id" varchar(255) NOT NULL,
  129. "group_id" varchar(128) NOT NULL,
  130. "tenant_id" varchar(128),
  131. "tag_id" varchar(128) NOT NULL,
  132. "app_name" varchar(128),
  133. "content" text NOT NULL,
  134. "md5" varchar(32),
  135. "gmt_create" timestamp(6) NOT NULL,
  136. "gmt_modified" timestamp(6) NOT NULL,
  137. "src_user" text,
  138. "src_ip" varchar(20)
  139. )
  140. ;
  141. COMMENT ON COLUMN "config_info_tag"."id" IS 'id';
  142. COMMENT ON COLUMN "config_info_tag"."data_id" IS 'data_id';
  143. COMMENT ON COLUMN "config_info_tag"."group_id" IS 'group_id';
  144. COMMENT ON COLUMN "config_info_tag"."tenant_id" IS 'tenant_id';
  145. COMMENT ON COLUMN "config_info_tag"."tag_id" IS 'tag_id';
  146. COMMENT ON COLUMN "config_info_tag"."app_name" IS 'app_name';
  147. COMMENT ON COLUMN "config_info_tag"."content" IS 'content';
  148. COMMENT ON COLUMN "config_info_tag"."md5" IS 'md5';
  149. COMMENT ON COLUMN "config_info_tag"."gmt_create" IS '创建时间';
  150. COMMENT ON COLUMN "config_info_tag"."gmt_modified" IS '修改时间';
  151. COMMENT ON COLUMN "config_info_tag"."src_user" IS 'source user';
  152. COMMENT ON COLUMN "config_info_tag"."src_ip" IS 'source ip';
  153. COMMENT ON TABLE "config_info_tag" IS 'config_info_tag';
  154. -- ----------------------------
  155. -- Records of config_info_tag
  156. -- ----------------------------
  157. BEGIN;
  158. COMMIT;
  159. -- ----------------------------
  160. -- Table structure for config_tags_relation
  161. -- ----------------------------
  162. DROP TABLE IF EXISTS "config_tags_relation";
  163. CREATE TABLE "config_tags_relation"
  164. (
  165. "id" bigserial NOT NULL,
  166. "tag_name" varchar(128) NOT NULL,
  167. "tag_type" varchar(64),
  168. "data_id" varchar(255) NOT NULL,
  169. "group_id" varchar(128) NOT NULL,
  170. "tenant_id" varchar(128),
  171. "nid" bigserial NOT NULL
  172. )
  173. ;
  174. COMMENT ON COLUMN "config_tags_relation"."id" IS 'id';
  175. COMMENT ON COLUMN "config_tags_relation"."tag_name" IS 'tag_name';
  176. COMMENT ON COLUMN "config_tags_relation"."tag_type" IS 'tag_type';
  177. COMMENT ON COLUMN "config_tags_relation"."data_id" IS 'data_id';
  178. COMMENT ON COLUMN "config_tags_relation"."group_id" IS 'group_id';
  179. COMMENT ON COLUMN "config_tags_relation"."tenant_id" IS 'tenant_id';
  180. COMMENT ON TABLE "config_tags_relation" IS 'config_tag_relation';
  181. -- ----------------------------
  182. -- Records of config_tags_relation
  183. -- ----------------------------
  184. BEGIN;
  185. COMMIT;
  186. -- ----------------------------
  187. -- Table structure for group_capacity
  188. -- ----------------------------
  189. DROP TABLE IF EXISTS "group_capacity";
  190. CREATE TABLE "group_capacity"
  191. (
  192. "id" bigserial NOT NULL,
  193. "group_id" varchar(128) NOT NULL,
  194. "quota" int4 NOT NULL,
  195. "usage" int4 NOT NULL,
  196. "max_size" int4 NOT NULL,
  197. "max_aggr_count" int4 NOT NULL,
  198. "max_aggr_size" int4 NOT NULL,
  199. "max_history_count" int4 NOT NULL,
  200. "gmt_create" timestamp(6) NOT NULL,
  201. "gmt_modified" timestamp(6) NOT NULL
  202. )
  203. ;
  204. COMMENT ON COLUMN "group_capacity"."id" IS '主键ID';
  205. COMMENT ON COLUMN "group_capacity"."group_id" IS 'Group ID,空字符表示整个集群';
  206. COMMENT ON COLUMN "group_capacity"."quota" IS '配额,0表示使用默认值';
  207. COMMENT ON COLUMN "group_capacity"."usage" IS '使用量';
  208. COMMENT ON COLUMN "group_capacity"."max_size" IS '单个配置大小上限,单位为字节,0表示使用默认值';
  209. COMMENT ON COLUMN "group_capacity"."max_aggr_count" IS '聚合子配置最大个数,,0表示使用默认值';
  210. COMMENT ON COLUMN "group_capacity"."max_aggr_size" IS '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值';
  211. COMMENT ON COLUMN "group_capacity"."max_history_count" IS '最大变更历史数量';
  212. COMMENT ON COLUMN "group_capacity"."gmt_create" IS '创建时间';
  213. COMMENT ON COLUMN "group_capacity"."gmt_modified" IS '修改时间';
  214. COMMENT ON TABLE "group_capacity" IS '集群、各Group容量信息表';
  215. -- ----------------------------
  216. -- Records of group_capacity
  217. -- ----------------------------
  218. BEGIN;
  219. COMMIT;
  220. -- ----------------------------
  221. -- Table structure for his_config_info
  222. -- ----------------------------
  223. DROP TABLE IF EXISTS "his_config_info";
  224. CREATE TABLE "his_config_info"
  225. (
  226. "id" int8 NOT NULL,
  227. "nid" bigserial NOT NULL,
  228. "data_id" varchar(255) NOT NULL,
  229. "group_id" varchar(128) NOT NULL,
  230. "app_name" varchar(128),
  231. "content" text NOT NULL,
  232. "md5" varchar(32),
  233. "gmt_create" timestamp(6) NOT NULL DEFAULT '2010-05-05 00:00:00',
  234. "gmt_modified" timestamp(6) NOT NULL,
  235. "src_user" text,
  236. "src_ip" varchar(20),
  237. "op_type" char(10),
  238. "tenant_id" varchar(128),
  239. "encrypted_data_key" text NOT NULL
  240. )
  241. ;
  242. COMMENT ON COLUMN "his_config_info"."app_name" IS 'app_name';
  243. COMMENT ON COLUMN "his_config_info"."tenant_id" IS '租户字段';
  244. COMMENT ON COLUMN "his_config_info"."encrypted_data_key" IS '秘钥';
  245. COMMENT ON TABLE "his_config_info" IS '多租户改造';
  246. -- ----------------------------
  247. -- Table structure for permissions
  248. -- ----------------------------
  249. DROP TABLE IF EXISTS "permissions";
  250. CREATE TABLE "permissions"
  251. (
  252. "role" varchar(50) NOT NULL,
  253. "resource" varchar(512) NOT NULL,
  254. "action" varchar(8) NOT NULL
  255. )
  256. ;
  257. -- ----------------------------
  258. -- Records of permissions
  259. -- ----------------------------
  260. BEGIN;
  261. COMMIT;
  262. -- ----------------------------
  263. -- Table structure for roles
  264. -- ----------------------------
  265. DROP TABLE IF EXISTS "roles";
  266. CREATE TABLE "roles"
  267. (
  268. "username" varchar(50) NOT NULL,
  269. "role" varchar(50) NOT NULL
  270. )
  271. ;
  272. -- ----------------------------
  273. -- Records of roles
  274. -- ----------------------------
  275. BEGIN;
  276. INSERT INTO "roles"
  277. VALUES ('nacos', 'ROLE_ADMIN');
  278. COMMIT;
  279. -- ----------------------------
  280. -- Table structure for tenant_capacity
  281. -- ----------------------------
  282. DROP TABLE IF EXISTS "tenant_capacity";
  283. CREATE TABLE "tenant_capacity"
  284. (
  285. "id" bigserial NOT NULL,
  286. "tenant_id" varchar(128) NOT NULL,
  287. "quota" int4 NOT NULL,
  288. "usage" int4 NOT NULL,
  289. "max_size" int4 NOT NULL,
  290. "max_aggr_count" int4 NOT NULL,
  291. "max_aggr_size" int4 NOT NULL,
  292. "max_history_count" int4 NOT NULL,
  293. "gmt_create" timestamp(6) NOT NULL,
  294. "gmt_modified" timestamp(6) NOT NULL
  295. )
  296. ;
  297. COMMENT ON COLUMN "tenant_capacity"."id" IS '主键ID';
  298. COMMENT ON COLUMN "tenant_capacity"."tenant_id" IS 'Tenant ID';
  299. COMMENT ON COLUMN "tenant_capacity"."quota" IS '配额,0表示使用默认值';
  300. COMMENT ON COLUMN "tenant_capacity"."usage" IS '使用量';
  301. COMMENT ON COLUMN "tenant_capacity"."max_size" IS '单个配置大小上限,单位为字节,0表示使用默认值';
  302. COMMENT ON COLUMN "tenant_capacity"."max_aggr_count" IS '聚合子配置最大个数';
  303. COMMENT ON COLUMN "tenant_capacity"."max_aggr_size" IS '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值';
  304. COMMENT ON COLUMN "tenant_capacity"."max_history_count" IS '最大变更历史数量';
  305. COMMENT ON COLUMN "tenant_capacity"."gmt_create" IS '创建时间';
  306. COMMENT ON COLUMN "tenant_capacity"."gmt_modified" IS '修改时间';
  307. COMMENT ON TABLE "tenant_capacity" IS '租户容量信息表';
  308. -- ----------------------------
  309. -- Records of tenant_capacity
  310. -- ----------------------------
  311. BEGIN;
  312. COMMIT;
  313. -- ----------------------------
  314. -- Table structure for tenant_info
  315. -- ----------------------------
  316. DROP TABLE IF EXISTS "tenant_info";
  317. CREATE TABLE "tenant_info"
  318. (
  319. "id" bigserial NOT NULL,
  320. "kp" varchar(128) NOT NULL,
  321. "tenant_id" varchar(128),
  322. "tenant_name" varchar(128),
  323. "tenant_desc" varchar(256),
  324. "create_source" varchar(32),
  325. "gmt_create" int8 NOT NULL,
  326. "gmt_modified" int8 NOT NULL
  327. )
  328. ;
  329. COMMENT ON COLUMN "tenant_info"."id" IS 'id';
  330. COMMENT ON COLUMN "tenant_info"."kp" IS 'kp';
  331. COMMENT ON COLUMN "tenant_info"."tenant_id" IS 'tenant_id';
  332. COMMENT ON COLUMN "tenant_info"."tenant_name" IS 'tenant_name';
  333. COMMENT ON COLUMN "tenant_info"."tenant_desc" IS 'tenant_desc';
  334. COMMENT ON COLUMN "tenant_info"."create_source" IS 'create_source';
  335. COMMENT ON COLUMN "tenant_info"."gmt_create" IS '创建时间';
  336. COMMENT ON COLUMN "tenant_info"."gmt_modified" IS '修改时间';
  337. COMMENT ON TABLE "tenant_info" IS 'tenant_info';
  338. -- ----------------------------
  339. -- Records of tenant_info
  340. -- ----------------------------
  341. BEGIN;
  342. COMMIT;
  343. -- ----------------------------
  344. -- Table structure for users
  345. -- ----------------------------
  346. DROP TABLE IF EXISTS "users";
  347. CREATE TABLE "users"
  348. (
  349. "username" varchar(50) NOT NULL,
  350. "password" varchar(500) NOT NULL,
  351. "enabled" boolean NOT NULL
  352. )
  353. ;
  354. -- ----------------------------
  355. -- Records of users
  356. -- ----------------------------
  357. BEGIN;
  358. INSERT INTO "users"
  359. VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);
  360. COMMIT;
  361. -- ----------------------------
  362. -- Indexes structure for table config_info
  363. -- ----------------------------
  364. CREATE UNIQUE INDEX "uk_configinfo_datagrouptenant" ON "config_info" ("data_id", "group_id", "tenant_id");
  365. -- ----------------------------
  366. -- Primary Key structure for table config_info
  367. -- ----------------------------
  368. ALTER TABLE "config_info"
  369. ADD CONSTRAINT "config_info_pkey" PRIMARY KEY ("id");
  370. -- ----------------------------
  371. -- Indexes structure for table config_info_aggr
  372. -- ----------------------------
  373. CREATE UNIQUE INDEX "uk_configinfoaggr_datagrouptenantdatum" ON "config_info_aggr" USING btree ("data_id", "group_id", "tenant_id", "datum_id");
  374. -- ----------------------------
  375. -- Primary Key structure for table config_info_aggr
  376. -- ----------------------------
  377. ALTER TABLE "config_info_aggr"
  378. ADD CONSTRAINT "config_info_aggr_pkey" PRIMARY KEY ("id");
  379. -- ----------------------------
  380. -- Indexes structure for table config_info_beta
  381. -- ----------------------------
  382. CREATE UNIQUE INDEX "uk_configinfobeta_datagrouptenant" ON "config_info_beta" USING btree ("data_id", "group_id", "tenant_id");
  383. -- ----------------------------
  384. -- Primary Key structure for table config_info_beta
  385. -- ----------------------------
  386. ALTER TABLE "config_info_beta"
  387. ADD CONSTRAINT "config_info_beta_pkey" PRIMARY KEY ("id");
  388. -- ----------------------------
  389. -- Indexes structure for table config_info_tag
  390. -- ----------------------------
  391. CREATE UNIQUE INDEX "uk_configinfotag_datagrouptenanttag" ON "config_info_tag" USING btree ("data_id", "group_id", "tenant_id", "tag_id");
  392. -- ----------------------------
  393. -- Primary Key structure for table config_info_tag
  394. -- ----------------------------
  395. ALTER TABLE "config_info_tag"
  396. ADD CONSTRAINT "config_info_tag_pkey" PRIMARY KEY ("id");
  397. -- ----------------------------
  398. -- Indexes structure for table config_tags_relation
  399. -- ----------------------------
  400. CREATE INDEX "idx_tenant_id" ON "config_tags_relation" USING btree (
  401. "tenant_id"
  402. );
  403. CREATE UNIQUE INDEX "uk_configtagrelation_configidtag" ON "config_tags_relation" USING btree (
  404. "id",
  405. "tag_name",
  406. "tag_type"
  407. );
  408. -- ----------------------------
  409. -- Primary Key structure for table config_tags_relation
  410. -- ----------------------------
  411. ALTER TABLE "config_tags_relation"
  412. ADD CONSTRAINT "config_tags_relation_pkey" PRIMARY KEY ("nid");
  413. -- ----------------------------
  414. -- Indexes structure for table group_capacity
  415. -- ----------------------------
  416. CREATE UNIQUE INDEX "uk_group_id" ON "group_capacity" USING btree (
  417. "group_id"
  418. );
  419. -- ----------------------------
  420. -- Primary Key structure for table group_capacity
  421. -- ----------------------------
  422. ALTER TABLE "group_capacity"
  423. ADD CONSTRAINT "group_capacity_pkey" PRIMARY KEY ("id");
  424. -- ----------------------------
  425. -- Indexes structure for table his_config_info
  426. -- ----------------------------
  427. CREATE INDEX "idx_did" ON "his_config_info" USING btree (
  428. "data_id"
  429. );
  430. CREATE INDEX "idx_gmt_create" ON "his_config_info" USING btree (
  431. "gmt_create"
  432. );
  433. CREATE INDEX "idx_gmt_modified" ON "his_config_info" USING btree (
  434. "gmt_modified"
  435. );
  436. -- ----------------------------
  437. -- Primary Key structure for table his_config_info
  438. -- ----------------------------
  439. ALTER TABLE "his_config_info"
  440. ADD CONSTRAINT "his_config_info_pkey" PRIMARY KEY ("nid");
  441. -- ----------------------------
  442. -- Indexes structure for table permissions
  443. -- ----------------------------
  444. CREATE UNIQUE INDEX "uk_role_permission" ON "permissions" USING btree (
  445. "role",
  446. "resource",
  447. "action"
  448. );
  449. -- ----------------------------
  450. -- Indexes structure for table roles
  451. -- ----------------------------
  452. CREATE UNIQUE INDEX "uk_username_role" ON "roles" USING btree (
  453. "username",
  454. "role"
  455. );
  456. -- ----------------------------
  457. -- Indexes structure for table tenant_capacity
  458. -- ----------------------------
  459. CREATE UNIQUE INDEX "uk_tenant_id" ON "tenant_capacity" USING btree (
  460. "tenant_id"
  461. );
  462. -- ----------------------------
  463. -- Primary Key structure for table tenant_capacity
  464. -- ----------------------------
  465. ALTER TABLE "tenant_capacity"
  466. ADD CONSTRAINT "tenant_capacity_pkey" PRIMARY KEY ("id");
  467. -- ----------------------------
  468. -- Indexes structure for table tenant_info
  469. -- ----------------------------
  470. CREATE UNIQUE INDEX "uk_tenant_info_kptenantid" ON "tenant_info" USING btree (
  471. "kp",
  472. "tenant_id"
  473. );