From 75a62ac6aac735fbd4cb10661f5125dbdd6e0d14 Mon Sep 17 00:00:00 2001 From: Wu Clan Date: Fri, 17 Oct 2025 13:05:10 +0800 Subject: [PATCH] Fix dict plugin pgsql init script missing (#857) * Fix dict plugin pgsql init script missing * Fix lint --- backend/plugin/dict/sql/postgresql/init.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/plugin/dict/sql/postgresql/init.sql b/backend/plugin/dict/sql/postgresql/init.sql index d562b63a..b9e456c5 100644 --- a/backend/plugin/dict/sql/postgresql/init.sql +++ b/backend/plugin/dict/sql/postgresql/init.sql @@ -51,3 +51,7 @@ values (34, 'user_online_status', '在线', '1', 'success', 2, 1, '用户在线状态', 11, now(), null), (35, 'sys_plugin_type', '压缩包', '0', 'gold', 1, 1, '插件类型-压缩包', 12, now(), null), (36, 'sys_plugin_type', 'GIT', '1', 'processing', 2, 1, '插件类型-GIT', 12, now(), null); + +-- reset auto-increment values for each table based on max id +select setval(pg_get_serial_sequence('sys_dict_type', 'id'),coalesce(max(id), 0) + 1, true) from sys_dict_type; +select setval(pg_get_serial_sequence('sys_dict_data', 'id'),coalesce(max(id), 0) + 1, true) from sys_dict_data;