araea / koishi-plugin-message-counter

用于统计群聊中用户的发言次数,并生成各种排行榜,包括日榜、周榜、月榜、年榜、总榜和圣龙王榜。🐉
5 stars 0 forks source link

使用MySQL数据库时会出现这个报错 #1

Closed ljyearnl closed 1 year ago

ljyearnl commented 1 year ago

我看了下 确实'id'没有值

2023-09-19 18:02:32 [W] app ER_NO_DEFAULT_FOR_FIELD: Field 'id' doesn't have a default value
                            at _MySQLDriver.query (C:\Koishi\koishi-app\node_modules\@minatojs\driver-mysql\lib\index.js:312:19)
                            at _MySQLDriver.create (C:\Koishi\koishi-app\node_modules\@minatojs\driver-mysql\lib\index.js:445:31)
                            at _Executable.execute (C:\Koishi\koishi-app\node_modules\@minatojs\core\lib\index.cjs:395:34)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async updateRecord (C:\Koishi\koishi-app\node_modules\koishi-plugin-message-counter\lib\index.js:83:17)
                            at async updateDailyRecord (C:\Koishi\koishi-app\node_modules\koishi-plugin-message-counter\lib\index.js:90:13)
                            at async Promise.all (index 0)
                            at async _Session.<anonymous> (C:\Koishi\koishi-app\node_modules\koishi-plugin-message-counter\lib\index.js:105:9)
ljyearnl commented 1 year ago

虽然是warning,不会影响运行,但是数据库里没有任何记录。

araea commented 1 year ago

感谢使用喵~ 已经收到啦~ 是本神尊考虑不周啊喵~ 1.0.1 版本已经更新啦,希望能让阁下满意喵~ 嗯,这次手动设置 id!