Closed ZhengXueNing closed 3 years ago
为了尝试解决上面的问题,我在更新表结构时,发生错误。错误如下:
升级 DB Schema 中遇到了错误
DatabaseError [SequelizeDatabaseError]: Table 'rap2.users' doesn't exist
at Query.formatError (/app/node_modules/sequelize/lib/dialects/mysql/query.js:244:16)
at Query.handler [as onResult] (/app/node_modules/sequelize/lib/dialects/mysql/query.js:51:23)
at Query.execute (/app/node_modules/mysql2/lib/commands/command.js:30:14)
at Connection.handlePacket (/app/node_modules/mysql2/lib/connection.js:425:32)
at PacketParser.onPacket (/app/node_modules/mysql2/lib/connection.js:75:12)
at PacketParser.executeStart (/app/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.Users
(id
INTEGER auto_increment , fullname
VARCHAR(32) NOT NULL, password
VARCHAR(32), email
VARCHAR(128) NOT NULL UNIQUE, createdAt
DATETIME NOT NULL, updatedAt
DATETIME NOT NULL, deletedAt
DATETIME, PRIMARY KEY (id
)) ENGINE=InnoDB;',
parameters: undefined
},
original: Error: Table 'rap2.users' doesn't exist
at Packet.asError (/app/node_modules/mysql2/lib/packets/packet.js:712:17)
at Query.execute (/app/node_modules/mysql2/lib/commands/command.js:28:26)
at Connection.handlePacket (/app/node_modules/mysql2/lib/connection.js:425:32)
at PacketParser.onPacket (/app/node_modules/mysql2/lib/connection.js:75:12)
at PacketParser.executeStart (/app/node_modules/mysql2/lib/packet_parser.js:75:16)
at Socket.Users
(id
INTEGER auto_increment , fullname
VARCHAR(32) NOT NULL, password
VARCHAR(32), email
VARCHAR(128) NOT NULL UNIQUE, createdAt
DATETIME NOT NULL, updatedAt
DATETIME NOT NULL, deletedAt
DATETIME, PRIMARY KEY (id
)) ENGINE=InnoDB;',
parameters: undefined
},
sql: 'CREATE TABLE IF NOT EXISTS Users
(id
INTEGER auto_increment , fullname
VARCHAR(32) NOT NULL, password
VARCHAR(32), email
VARCHAR(128) NOT NULL UNIQUE, createdAt
DATETIME NOT NULL, updatedAt
DATETIME NOT NULL, deletedAt
DATETIME, PRIMARY KEY (id
)) ENGINE=InnoDB;',
parameters: undefined
}
可以尝试设置mysql为不区分表名的大小写。mysql中的表应该为Users。
可以尝试设置mysql为不区分表名的大小写。mysql中的表应该为Users。
那您对于我的第一问题,有解决方案吗。登录接口报 500,这让我很崩溃。
运维问题,涉及到环境配置等运维上的常见问题,建议群里交流。
BUG描述 我国庆前还可以正常使用。国庆过来回来后,升级了一下docker。RAP就登录不上了。报500
复现步骤
期望结果
实际结果
截图
环境
附加信息