Skip to content

Commit 60930df

Browse files
committed
更新版本V0.0.55
更新版本V0.0.55
1 parent efe4d91 commit 60930df

File tree

7 files changed

+74
-6
lines changed

7 files changed

+74
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
> 最新更新:2025-05-07
3232
33-
> 0.0.54 公测版本介绍 如果你要使用本插件请务必进我们的官方 QQ 群(1018231382)!
33+
> 0.0.55 公测版本介绍 如果你要使用本插件请务必进我们的官方 QQ 群(1018231382)!
3434
>
3535
> 1. 修复了已知BUG
3636
>

README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Due to limited personal time, the frequency of updating plug-ins will not be ver
2626

2727
> Last updated: 2025-05-07
2828
29-
> 0.0.54 Public Beta Version Introduction: If you want to use this plugin, please be sure to join our official QQ group (1018231382)!
29+
> 0.0.55 Public Beta Version Introduction: If you want to use this plugin, please be sure to join our official QQ group (1018231382)!
3030
>
3131
> 1. Fixed known bugs
3232
>

app/server/dao/dao.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,74 @@ def add_column_if_not_exists(table, column, column_type):
300300

301301
# 更新所有UUID字段
302302
update_uuids_v3(conn)
303+
304+
# 删除空UUID的数据
305+
print("删除空UUID的数据...")
306+
cursor.execute("DELETE FROM tag_groups WHERE p_uuid IS NULL OR p_uuid = ''")
307+
cursor.execute("DELETE FROM tag_subgroups WHERE g_uuid IS NULL OR g_uuid = ''")
308+
cursor.execute("DELETE FROM tag_tags WHERE t_uuid IS NULL OR t_uuid = ''")
309+
310+
311+
# 处理重复的t_uuid值
312+
print("检查并修复重复的UUID...")
313+
cursor.execute('''
314+
SELECT t_uuid, COUNT(*) as count
315+
FROM tag_tags
316+
WHERE t_uuid IS NOT NULL
317+
GROUP BY t_uuid
318+
HAVING count > 1
319+
''')
320+
321+
duplicates = cursor.fetchall()
322+
for dup in duplicates:
323+
dup_uuid = dup[0]
324+
# 获取所有具有相同t_uuid的记录
325+
cursor.execute('SELECT id_index FROM tag_tags WHERE t_uuid = ? ORDER BY id_index', (dup_uuid,))
326+
records = cursor.fetchall()
327+
# 保留第一条记录,更新其余记录的t_uuid
328+
for record in records[1:]:
329+
new_uuid = getUUID()
330+
cursor.execute('UPDATE tag_tags SET t_uuid = ? WHERE id_index = ?', (new_uuid, record[0]))
331+
332+
# 处理重复的p_uuid值(tag_groups表)
333+
cursor.execute('''
334+
SELECT p_uuid, COUNT(*) as count
335+
FROM tag_groups
336+
WHERE p_uuid IS NOT NULL
337+
GROUP BY p_uuid
338+
HAVING count > 1
339+
''')
340+
341+
duplicates = cursor.fetchall()
342+
for dup in duplicates:
343+
dup_uuid = dup[0]
344+
# 获取所有具有相同p_uuid的记录
345+
cursor.execute('SELECT id_index FROM tag_groups WHERE p_uuid = ? ORDER BY id_index', (dup_uuid,))
346+
records = cursor.fetchall()
347+
# 保留第一条记录,更新其余记录的p_uuid
348+
for record in records[1:]:
349+
new_uuid = getUUID()
350+
cursor.execute('UPDATE tag_groups SET p_uuid = ? WHERE id_index = ?', (new_uuid, record[0]))
351+
352+
# 处理重复的g_uuid值(tag_subgroups表)
353+
cursor.execute('''
354+
SELECT g_uuid, COUNT(*) as count
355+
FROM tag_subgroups
356+
WHERE g_uuid IS NOT NULL
357+
GROUP BY g_uuid
358+
HAVING count > 1
359+
''')
360+
361+
duplicates = cursor.fetchall()
362+
for dup in duplicates:
363+
dup_uuid = dup[0]
364+
# 获取所有具有相同g_uuid的记录
365+
cursor.execute('SELECT id_index FROM tag_subgroups WHERE g_uuid = ? ORDER BY id_index', (dup_uuid,))
366+
records = cursor.fetchall()
367+
# 保留第一条记录,更新其余记录的g_uuid
368+
for record in records[1:]:
369+
new_uuid = getUUID()
370+
cursor.execute('UPDATE tag_subgroups SET g_uuid = ? WHERE id_index = ?', (new_uuid, record[0]))
303371

304372
# 添加唯一索引
305373
cursor.execute('CREATE UNIQUE INDEX IF NOT EXISTS idx_tag_groups_p_uuid ON tag_groups(p_uuid)')

dist/javascript/main.entry.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/javascript/main.entry.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "weilin-comfyui-tools"
33
description = "让你在 ComfyUI 中快捷的使用提示词工具 Quickly use the prompt word tool in ComfyUI"
4-
version = "0.0.54"
4+
version = "0.0.55"
55
license = {file = "LICENSE"}
66
dependencies = []
77

src/src/utils/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = "v0.0.54";
1+
export const version = "v0.0.55";

0 commit comments

Comments
 (0)