sequelize - Cannot add foreign key constraint
问题 I'm trying to set a 1:1 relation between two tables. RefreshToken table will have two foreignKey releated to Users table, as in this image: I used sequelize-auto to generate my sequelize models. Users model: module.exports = function(sequelize, DataTypes) { return sequelize.define('Users', { idUsers: { type: DataTypes.INTEGER(11), allowNull: false, primaryKey: true }, name: { type: DataTypes.STRING(45), allowNull: true }, mail: { type: DataTypes.STRING(45), allowNull: false, primaryKey: true