Skip to content

Commit 47f7af2

Browse files
committed
Fix dict plugin pgsql init script missing
1 parent 15a9527 commit 47f7af2

File tree

1 file changed

+4
-0
lines changed
  • backend/plugin/dict/sql/postgresql

1 file changed

+4
-0
lines changed

backend/plugin/dict/sql/postgresql/init.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@ values
5151
(34, 'user_online_status', '在线', '1', 'success', 2, 1, '用户在线状态', 11, now(), null),
5252
(35, 'sys_plugin_type', '压缩包', '0', 'gold', 1, 1, '插件类型-压缩包', 12, now(), null),
5353
(36, 'sys_plugin_type', 'GIT', '1', 'processing', 2, 1, '插件类型-GIT', 12, now(), null);
54+
55+
-- reset auto-increment values for each table based on max id
56+
select setval(pg_get_serial_sequence('sys_dict_type', 'id'),coalesce(max(id), 0) + 1, true) from sys_dict_type;
57+
select setval(pg_get_serial_sequence('sys_dict_data', 'id'),coalesce(max(id), 0) + 1, true) from sys_dict_data;

0 commit comments

Comments
 (0)