Executing (default): SELECT 1+1 AS result
Executing (default): DROP TABLE IF EXISTS atRelations
;
auth ok
Executing (default): DROP TABLE IF EXISTS userRelations
;
Executing (default): DROP TABLE IF EXISTS blogs
;
Executing (default): DROP TABLE IF EXISTS users
;
Executing (default): DROP TABLE IF EXISTS users
;
Executing (default): CREATE TABLE IF NOT EXISTS users
(id
INTEGER NOT NULL auto_increment , userName
VARCHAR(255) NOT NULL UNIQUE COMMENT ‘用户名,唯一’, password
VARCHAR(255) NOT NULL COMMENT ‘密码’, nickName
VARCHAR(255) NOT NULL COMMENT ‘昵称’, gender
DECIMAL NOT NULL DEFAULT 3 COMMENT ‘性别(1 男性,2 女性,3 保密)’, picture
VARCHAR(255) COMMENT ‘头像,图片地址’, city
VARCHAR(255) COMMENT ‘城市’, createdAt
DATETIME NOT NULL, updatedAt
DATETIME NOT NULL, PRIMARY KEY (id
)) ENGINE=InnoDB;
Unhandled rejection SequelizeDatabaseError: Specified key was too long; max key length is 767 bytes
at Query.formatError (/www/wwwroot/koa2-weibo/node_modules/sequelize/lib/dialects/mysql/query.js:244:16)
at Query.handler [as onResult] (/www/wwwroot/koa2-weibo/node_modules/sequelize/lib/dialects/mysql/query.js:51:23)
at Query.execute (/www/wwwroot/koa2-weibo/node_modules/mysql2/lib/commands/command.js:30:14)
at Connection.handlePacket (/www/wwwroot/koa2-weibo/node_modules/mysql2/lib/connection.js:408:32)
at PacketParser.onPacket (/www/wwwroot/koa2-weibo/node_modules/mysql2/lib/connection.js:70:12)
at PacketParser.executeStart (/www/wwwroot/koa2-weibo/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket. (/www/wwwroot/koa2-weibo/node_modules/mysql2/lib/connection.js:77:25)
at Socket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
登录后可查看更多问答,登录/注册