-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用 MySQL 搭建报错 #29
Comments
看到刚提交的修复了 |
好的,不过并没有完整测试,期待反馈。 |
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = ? ORDER BY tokens.id LIMIT 1' at line 1 |
Okay,收到 |
已推送, 我现在手头没有 MySQL 环境,只在 SQLite 测试了一下,如果方便的话麻烦测试一下,谢谢。 |
另外,貌似你填成令牌的名字而非 key 了,这个 key 都是生成的 UUID 随机字符串。 不过和 MySQL 报错没有关系。 |
哈哈哈,因为之前碰到两个人把 key 填成名字了。 |
经测试已修复 |
谢谢,原因在于 如果还有其他 MySQL 相关的问题,期待继续反馈。 |
[SYS] 2023/04/27 - 01:46:40 | One API v0.1.5 started
[FATAL] 2023/04/27 - 01:46:40 | [Error 1170: BLOB/TEXT column 'key' used in key specification without a key length]
2023/04/27 01:46:40 �[31;1m/build/model/main.go:61 �[35;1mError 1170: BLOB/TEXT column 'key' used in key specification without a key length
�[0m�[33m[4.126ms] �[34;1m[rows:0]�[0m CREATE TABLE
tokens
(id
bigint AUTO_INCREMENT,user_id
bigint,key
longtext,status
bigint DEFAULT 1,name
varchar(191),created_time
bigint,accessed_time
bigint,expired_time
bigint DEFAULT -1,remain_times
bigint DEFAULT 0,unlimited_times
boolean DEFAULT false,PRIMARY KEY (id
),UNIQUE INDEXidx_tokens_key
(key
),INDEXidx_tokens_name
(name
))The text was updated successfully, but these errors were encountered: