Skip to content

Commit 648e91e

Browse files
author
zhangming03
committed
modify-polaris_server.sql
1 parent 915d2e4 commit 648e91e

File tree

1 file changed

+127
-49
lines changed

1 file changed

+127
-49
lines changed

store/postgresql/script/polaris_server.sql

Lines changed: 127 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,26 @@ ALTER TABLE "public"."auth_strategy" OWNER TO "postgres";
5757
-- Records of auth_strategy
5858
-- ----------------------------
5959
BEGIN;
60+
INSERT INTO auth_strategy("id",
61+
"name",
62+
"action",
63+
"owner",
64+
"comment",
65+
"default",
66+
"revision",
67+
"flag",
68+
"ctime",
69+
"mtime")
70+
VALUES ('fbca9bfa04ae4ead86e1ecf5811e32a9',
71+
'(用户) polaris的默认策略',
72+
'READ_WRITE',
73+
'65e4789a6d5b49669adf1e9e8387549c',
74+
'default admin',
75+
1,
76+
'fbca9bfa04ae4ead86e1ecf5811e32a9',
77+
0,
78+
current_date,
79+
current_date);
6080
COMMIT;
6181

6282
-- ----------------------------
@@ -77,6 +97,26 @@ ALTER TABLE "public"."auth_strategy_resource" OWNER TO "postgres";
7797
-- Records of auth_strategy_resource
7898
-- ----------------------------
7999
BEGIN;
100+
INSERT INTO auth_strategy_resource("strategy_id",
101+
"res_type",
102+
"res_id",
103+
"ctime",
104+
"mtime")
105+
VALUES ('fbca9bfa04ae4ead86e1ecf5811e32a9',
106+
0,
107+
'*',
108+
current_date,
109+
current_date),
110+
('fbca9bfa04ae4ead86e1ecf5811e32a9',
111+
1,
112+
'*',
113+
current_date,
114+
current_date),
115+
('fbca9bfa04ae4ead86e1ecf5811e32a9',
116+
2,
117+
'*',
118+
current_date,
119+
current_date);
80120
COMMIT;
81121

82122
-- ----------------------------
@@ -226,11 +266,6 @@ ALTER TABLE "public"."client" OWNER TO "postgres";
226266
-- Records of client
227267
-- ----------------------------
228268
BEGIN;
229-
INSERT INTO "public"."client" ("id", "host", "type", "version", "region", "zone", "campus", "flag", "ctime", "mtime") VALUES ('client-0', 'client-0', 'UNKNOWN', 'client-0', 'client-0-region', 'client-0-zone', 'client-0-campus', 0, '2023-06-12 13:56:21', '2023-06-12 13:56:21');
230-
INSERT INTO "public"."client" ("id", "host", "type", "version", "region", "zone", "campus", "flag", "ctime", "mtime") VALUES ('client-1', 'client-1', 'UNKNOWN', 'client-1', 'client-1-region', 'client-1-zone', 'client-1-campus', 0, '2023-06-12 13:56:21', '2023-06-12 13:56:21');
231-
INSERT INTO "public"."client" ("id", "host", "type", "version", "region", "zone", "campus", "flag", "ctime", "mtime") VALUES ('client-2', 'client-2', 'UNKNOWN', 'client-2', 'client-2-region', 'client-2-zone', 'client-2-campus', 0, '2023-06-12 13:56:21', '2023-06-12 13:56:21');
232-
INSERT INTO "public"."client" ("id", "host", "type", "version", "region", "zone", "campus", "flag", "ctime", "mtime") VALUES ('client-3', 'client-3', 'UNKNOWN', 'client-3', 'client-3-region', 'client-3-zone', 'client-3-campus', 0, '2023-06-12 13:56:21', '2023-06-12 13:56:21');
233-
INSERT INTO "public"."client" ("id", "host", "type", "version", "region", "zone", "campus", "flag", "ctime", "mtime") VALUES ('client-4', 'client-4', 'UNKNOWN', 'client-4', 'client-4-region', 'client-4-zone', 'client-4-campus', 0, '2023-06-12 13:56:21', '2023-06-12 13:56:21');
234269
COMMIT;
235270

236271
-- ----------------------------
@@ -251,11 +286,6 @@ ALTER TABLE "public"."client_stat" OWNER TO "postgres";
251286
-- Records of client_stat
252287
-- ----------------------------
253288
BEGIN;
254-
INSERT INTO "public"."client_stat" ("client_id", "target", "port", "protocol", "path") VALUES ('client-0', 'prometheus', 8080, 'http', '/metrics');
255-
INSERT INTO "public"."client_stat" ("client_id", "target", "port", "protocol", "path") VALUES ('client-1', 'prometheus', 8080, 'http', '/metrics');
256-
INSERT INTO "public"."client_stat" ("client_id", "target", "port", "protocol", "path") VALUES ('client-2', 'prometheus', 8080, 'http', '/metrics');
257-
INSERT INTO "public"."client_stat" ("client_id", "target", "port", "protocol", "path") VALUES ('client-3', 'prometheus', 8080, 'http', '/metrics');
258-
INSERT INTO "public"."client_stat" ("client_id", "target", "port", "protocol", "path") VALUES ('client-4', 'prometheus', 8080, 'http', '/metrics');
259289
COMMIT;
260290

261291
-- ----------------------------
@@ -416,6 +446,26 @@ ALTER TABLE "public"."config_file_template" OWNER TO "postgres";
416446
-- Records of config_file_template
417447
-- ----------------------------
418448
BEGIN;
449+
INSERT INTO "public"."config_file_template" ("id", "name", "content", "format", "comment", "create_time", "create_by", "modify_time", "modify_by") VALUES (1, 'spring-cloud-gateway-braining', '{
450+
"rules":[
451+
{
452+
"conditions":[
453+
{
454+
"key":"${http.query.uid}",
455+
"values":["10000"],
456+
"operation":"EQUALS"
457+
}
458+
],
459+
"labels":[
460+
{
461+
"key":"env",
462+
"value":"green"
463+
}
464+
]
465+
}
466+
]
467+
}
468+
', 'json', 'Spring Cloud Gateway 染色规则', '2023-06-13 01:40:24', 'polaris', '2023-06-13 01:40:34', 'polaris');
419469
COMMIT;
420470

421471
-- ----------------------------
@@ -461,10 +511,6 @@ ALTER TABLE "public"."health_check" OWNER TO "postgres";
461511
-- Records of health_check
462512
-- ----------------------------
463513
BEGIN;
464-
INSERT INTO "public"."health_check" ("id", "type", "ttl") VALUES ('1112', 1, 2);
465-
INSERT INTO "public"."health_check" ("id", "type", "ttl") VALUES ('1111e', 1, 1);
466-
INSERT INTO "public"."health_check" ("id", "type", "ttl") VALUES ('1111u', 1, 1);
467-
INSERT INTO "public"."health_check" ("id", "type", "ttl") VALUES ('1111i', 1, 1);
468514
COMMIT;
469515

470516
-- ----------------------------
@@ -500,16 +546,6 @@ ALTER TABLE "public"."instance" OWNER TO "postgres";
500546
-- Records of instance
501547
-- ----------------------------
502548
BEGIN;
503-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111c', '111c', '4444c', '5555c', 1001, '', '', 1, 0, 0, 0, '', '', '', '', 0, '', 0, '2023-06-10 17:15:03', '2023-06-10 17:15:03');
504-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111q', '111q', '4444q', '5555q', 1001, '', '', 1, 0, 0, 0, '', '', '', '', 0, '', 0, '2023-06-10 17:17:22', '2023-06-10 17:17:22');
505-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111e', '111e', '4444e', '5555e', 1001, '', '', 1, 0, 0, 0, '', '', '', '', 0, '', 0, '2023-06-10 18:12:08', '2023-06-10 18:12:08');
506-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111y', '111y', '4444y', '5555y', 1001, '', '', 1, 0, 0, 0, '', '', '', '', 0, '', 0, '2023-06-10 18:48:17', '2023-06-10 18:48:17');
507-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111u', '111u', '4444u', '5555u', 1001, '', '', 1, 0, 0, 0, '', '', '', '', 0, '', 0, '2023-06-10 18:50:30', '2023-06-10 18:50:30');
508-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111i', '111i', '4444i', '5555i', 1001, '', '', 1, 0, 0, 0, '', '', '', '', 0, '', 0, '2023-06-10 18:56:28', '2023-06-10 18:56:28');
509-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111t', '111t', '4444t', '5555t', 1001, '', '', 1, 0, 0, 0, '', '', '', '', 0, '', 1, '2023-06-10 18:16:21', '2023-06-10 19:15:20');
510-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111', '111', '4444', '55555', 1, '', '', 1, 0, 0, 0, '', '', '', '', 0, 'reversion', 0, '2023-06-10 17:05:31', '2023-06-11 01:09:55');
511-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111a', '111a', '4444a', '55555a', 1, '', '', 1, 1, 0, 0, '', '', '', '', 0, 'reversion', 0, '2023-06-10 17:10:31', '2023-06-11 01:24:17');
512-
INSERT INTO "public"."instance" ("id", "service_id", "vpc_id", "host", "port", "protocol", "version", "health_status", "isolate", "weight", "enable_health_check", "logic_set", "cmdb_region", "cmdb_zone", "cmdb_idc", "priority", "revision", "flag", "ctime", "mtime") VALUES ('1111b', '111a', '4444b', '55555b', 1001, '', '', 1, 1, 0, 0, '', '', '', '', 0, 'reversion', 0, '2023-06-10 17:12:04', '2023-06-11 01:24:17');
513549
COMMIT;
514550

515551
-- ----------------------------
@@ -530,14 +566,6 @@ ALTER TABLE "public"."instance_metadata" OWNER TO "postgres";
530566
-- Records of instance_metadata
531567
-- ----------------------------
532568
BEGIN;
533-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1111u', 'mkey', '6666u', '2023-06-10 18:50:30', '2023-06-10 18:50:30');
534-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1111u', 'mvalue', '7777u', '2023-06-10 18:50:30', '2023-06-10 18:50:30');
535-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1111i', 'mkey', '6666i', '2023-06-10 18:56:28', '2023-06-10 18:56:28');
536-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1111i', 'mvalue', '7777i', '2023-06-10 18:56:28', '2023-06-10 18:56:28');
537-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1111t', 'mvalue', '7777t', '2023-06-10 19:11:05', '2023-06-10 19:11:05');
538-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1111t', 'mkey', '6666t', '2023-06-10 19:11:05', '2023-06-10 19:11:05');
539-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('111', 'aaa', '1111', '2023-06-11 01:35:36', '2023-06-11 01:35:36');
540-
INSERT INTO "public"."instance_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('111', 'bbb', '2222', '2023-06-11 01:35:36', '2023-06-11 01:35:36');
541569
COMMIT;
542570

543571
-- ----------------------------
@@ -558,12 +586,6 @@ ALTER TABLE "public"."leader_election" OWNER TO "postgres";
558586
-- Records of leader_election
559587
-- ----------------------------
560588
BEGIN;
561-
INSERT INTO "public"."leader_election" ("elect_key", "version", "leader", "ctime", "mtime") VALUES ('aaa', 0, 'bbb', '2023-06-08 21:02:58.295652', '2023-06-08 21:02:58.295652');
562-
INSERT INTO "public"."leader_election" ("elect_key", "version", "leader", "ctime", "mtime") VALUES ('val1', 0, 'val2', '2023-06-08 21:27:28.860113', '2023-06-08 21:27:28.860113');
563-
INSERT INTO "public"."leader_election" ("elect_key", "version", "leader", "ctime", "mtime") VALUES ('val3', 0, 'val4', '2023-06-08 21:28:04.848416', '2023-06-08 21:28:04.848416');
564-
INSERT INTO "public"."leader_election" ("elect_key", "version", "leader", "ctime", "mtime") VALUES ('val5', 0, 'val6', '2023-06-08 21:28:22.117857', '2023-06-08 21:28:22.117857');
565-
INSERT INTO "public"."leader_election" ("elect_key", "version", "leader", "ctime", "mtime") VALUES ('val7', 0, 'val8', '2023-06-08 21:30:35.287969', '2023-06-08 21:30:35.287969');
566-
INSERT INTO "public"."leader_election" ("elect_key", "version", "leader", "ctime", "mtime") VALUES ('test0', 0, '', '2023-06-08 22:04:50.696531', '2023-06-08 22:04:50.696531');
567589
COMMIT;
568590

569591
-- ----------------------------
@@ -707,10 +729,27 @@ ALTER TABLE "public"."namespace" OWNER TO "postgres";
707729
-- Records of namespace
708730
-- ----------------------------
709731
BEGIN;
710-
INSERT INTO "public"."namespace" ("name", "comment", "token", "owner", "flag", "ctime", "mtime") VALUES ('Polaris', 'Polaris-server', '2d1bfe5d12e04d54b8ee69e62494c7fd', 'polaris', 0, '2019-09-06 07:55:07', '2019-09-06 07:55:07');
711-
INSERT INTO "public"."namespace" ("name", "comment", "token", "owner", "flag", "ctime", "mtime") VALUES ('default', 'Default Environment', 'e2e473081d3d4306b52264e49f7ce227', 'polaris', 0, '2021-07-27 19:37:37', '2021-07-27 19:37:37');
712-
INSERT INTO "public"."namespace" ("name", "comment", "token", "owner", "flag", "ctime", "mtime") VALUES ('Test1', 'Polaris-test1', '2d1bfe5d12e04d54b8ee69e62494c7fe', 'polaris', 0, '2023-06-07 21:14:27', '2023-06-07 21:48:01');
713-
INSERT INTO "public"."namespace" ("name", "comment", "token", "owner", "flag", "ctime", "mtime") VALUES ('Test', 'Polaris-test1', '2d1bfe5d12e04d54b8ee69e62494c7fr', 'polaris', 0, '2023-06-03 16:02:03', '2023-06-07 21:49:45');
732+
INSERT INTO "public"."namespace" ("name",
733+
"comment",
734+
"token",
735+
"owner",
736+
"flag",
737+
"ctime",
738+
"mtime")
739+
VALUES ('Polaris',
740+
'Polaris-server',
741+
'2d1bfe5d12e04d54b8ee69e62494c7fd',
742+
'polaris',
743+
0,
744+
'2019-09-06 07:55:07',
745+
'2019-09-06 07:55:07'),
746+
('default',
747+
'Default Environment',
748+
'e2e473081d3d4306b52264e49f7ce227',
749+
'polaris',
750+
0,
751+
'2021-07-27 19:37:37',
752+
'2021-07-27 19:37:37');
714753
COMMIT;
715754

716755
-- ----------------------------
@@ -730,7 +769,6 @@ ALTER TABLE "public"."owner_service_map" OWNER TO "postgres";
730769
-- Records of owner_service_map
731770
-- ----------------------------
732771
BEGIN;
733-
INSERT INTO "public"."owner_service_map" ("id", "owner", "service", "namespace") VALUES ('6f0b97ece75c4affbbccf958651c8430', 'polaris', 'Test1', '2222');
734772
COMMIT;
735773

736774
-- ----------------------------
@@ -799,7 +837,6 @@ ALTER TABLE "public"."routing_config" OWNER TO "postgres";
799837
-- Records of routing_config
800838
-- ----------------------------
801839
BEGIN;
802-
INSERT INTO "public"."routing_config" ("id", "in_bounds", "out_bounds", "revision", "flag", "ctime", "mtime") VALUES ('1111', '2223', '3333', '4444', 0, '2023-06-11 14:34:39', '2023-06-11 14:39:27');
803840
COMMIT;
804841

805842
-- ----------------------------
@@ -829,7 +866,6 @@ ALTER TABLE "public"."routing_config_v2" OWNER TO "postgres";
829866
-- Records of routing_config_v2
830867
-- ----------------------------
831868
BEGIN;
832-
INSERT INTO "public"."routing_config_v2" ("id", "name", "namespace", "policy", "config", "enable", "revision", "description", "priority", "flag", "ctime", "mtime", "etime", "extend_info") VALUES ('1111', '3333', '2222', '4444', '5555', 1, '6666', '7777', 1, 0, '2023-06-11 17:21:15', '2023-06-11 17:30:37', '2023-06-11 17:30:37', '');
833869
COMMIT;
834870

835871
-- ----------------------------
@@ -864,7 +900,28 @@ ALTER TABLE "public"."service" OWNER TO "postgres";
864900
-- Records of service
865901
-- ----------------------------
866902
BEGIN;
867-
INSERT INTO "public"."service" ("id", "name", "namespace", "ports", "business", "department", "cmdb_mod1", "cmdb_mod2", "cmdb_mod3", "comment", "token", "revision", "owner", "flag", "reference", "refer_filter", "platform_id", "ctime", "mtime") VALUES ('1111', 'Test1', '2222', '4444', '33333', '555', '666', '777', '888', 'Polaris-test', '2d1bfe5d12e04d54b8ee69e62494c7fe', '999', 'polaris', 0, '', NULL, '121212', '2023-06-09 15:50:31', '2023-06-09 22:02:22');
903+
INSERT INTO "public"."service" ("id",
904+
"name",
905+
"namespace",
906+
"comment",
907+
"business",
908+
"token",
909+
"revision",
910+
"owner",
911+
"flag",
912+
"ctime",
913+
"mtime")
914+
VALUES ('fbca9bfa04ae4ead86e1ecf5811e32a9',
915+
'polaris.checker',
916+
'Polaris',
917+
'polaris checker service',
918+
'polaris',
919+
'7d19c46de327408d8709ee7392b7700b',
920+
'301b1e9f0bbd47a6b697e26e99dfe012',
921+
'polaris',
922+
0,
923+
'2021-09-06 07:55:07',
924+
'2021-09-06 07:55:09');
868925
COMMIT;
869926

870927
-- ----------------------------
@@ -885,8 +942,6 @@ ALTER TABLE "public"."service_metadata" OWNER TO "postgres";
885942
-- Records of service_metadata
886943
-- ----------------------------
887944
BEGIN;
888-
INSERT INTO "public"."service_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1112', 'a', 'b', '2023-06-09 15:44:56', '2023-06-09 15:44:56');
889-
INSERT INTO "public"."service_metadata" ("id", "mkey", "mvalue", "ctime", "mtime") VALUES ('1111', 'a', 'b', '2023-06-09 21:52:21', '2023-06-09 21:52:21');
890945
COMMIT;
891946

892947
-- ----------------------------
@@ -906,6 +961,8 @@ ALTER TABLE "public"."start_lock" OWNER TO "postgres";
906961
-- Records of start_lock
907962
-- ----------------------------
908963
BEGIN;
964+
INSERT INTO "start_lock" ("lock_id", "lock_key", "server", "mtime")
965+
VALUES (1, 'sz', 'aaa', '2019-12-05 08:35:49');
909966
COMMIT;
910967

911968
-- ----------------------------
@@ -971,7 +1028,6 @@ ALTER TABLE "public"."t_route" OWNER TO "postgres";
9711028
-- Records of t_route
9721029
-- ----------------------------
9731030
BEGIN;
974-
INSERT INTO "public"."t_route" ("fip", "fmodid", "fcmdid", "fsetid", "fflag", "fstamp", "fflow") VALUES (1, 1, 1, '1', 4, '2023-06-11 17:30:37', 4);
9751031
COMMIT;
9761032

9771033
-- ----------------------------
@@ -1023,6 +1079,28 @@ ALTER TABLE "public"."user" OWNER TO "postgres";
10231079
-- Records of user
10241080
-- ----------------------------
10251081
BEGIN;
1082+
INSERT INTO "user" ("id",
1083+
"name",
1084+
"password",
1085+
"source",
1086+
"token",
1087+
"token_enable",
1088+
"user_type",
1089+
"comment",
1090+
"mobile",
1091+
"email",
1092+
"owner")
1093+
VALUES ('65e4789a6d5b49669adf1e9e8387549c',
1094+
'polaris',
1095+
'$2a$10$3izWuZtE5SBdAtSZci.gs.iZ2pAn9I8hEqYrC6gwJp1dyjqQnrrum',
1096+
'Polaris',
1097+
'nu/0WRA4EqSR1FagrjRj0fZwPXuGlMpX+zCuWu4uMqy8xr1vRjisSbA25aAC3mtU8MeeRsKhQiDAynUR09I=',
1098+
1,
1099+
20,
1100+
'default polaris admin account',
1101+
'12345678910',
1102+
'12345678910',
1103+
'');
10261104
COMMIT;
10271105

10281106
-- ----------------------------

0 commit comments

Comments
 (0)