我在以下行中有一个SQL查询
CONSTRAINT `some_key_1` FOREIGN KEY (`another_table_uuid`) REFERENCES `another_table` (`uuid`),
CONSTRAINT `some_key_2` FOREIGN KEY (`another_table_uuid`) REFERENCES `another_table` (`uuid`)
我像这样在续集中创建了一个关联:
current_table.associate = models => {
current_table.belongsTo(models.another_table, {
foreignKey: "another_table_uuid",
targetKey: "uuid",
});
current_table.belongsTo(models.another_table, {
foreignKey: "another_table_uuid",
targetKey: "uuid",
});
});
但是如何在此处添加约束名称
也是mysql中的这一行:
密钥somekey_name_UUID
(some_table_uuid
)
如何将其更改为续集。