How to create a cross-schema transaction using Sequelize:MySql?
Couldn't find anything at Sequelize docs yet this functionality is possible via MySql.
Assuming I'm creating two schemas (or databases in the MySQL terminology):
const Sequelize = require("sequelize");
const config = require("../config");
const UsersDb = new Sequelize(config.usersDatabaseName, config.username, config.password, config.options);
const ProductsDb = new Sequelize(config.productsDatabaseName, config.username, config.password, config.options);
Is there something like this?
await BothDBConnections.transaction(null, async (transaction) => {
///
})