So, I've created two tables which reference the same one (say, address and a user has an address and company too). This makes me run into this problem:
Constraint created by sequelize: addressId_foreign_idx
Results: Both tables will try to use the same constraint name, which, as you might expect, results in:
code: 'ER_DUP_KEY',
errno: 1022,
sqlState: '23000',
So, I've created two tables which reference the same one (say, address and a user has an address and company too). This makes me run into this problem:
Constraint created by sequelize: addressId_foreign_idx
Results: Both tables will try to use the same constraint name, which, as you might expect, results in: