TYPE queries are executed outside of the transaction.
var User = sequelize.define('User', {
type: Sequelize.ENUM('a', 'b')
});
sequelize.transaction()
.then(function (tx) {
return sequelize.sync({
force: true,
transaction: tx
})
})
.then(function () {
tx.commit();
});
SQL log:
Executing (814aa406-47f7-405e-be52-620304464fdc): START TRANSACTION;
Executing (814aa406-47f7-405e-be52-620304464fdc): SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
Executing (814aa406-47f7-405e-be52-620304464fdc): SET autocommit = 1;
Executing (814aa406-47f7-405e-be52-620304464fdc): DROP TABLE IF EXISTS "Users" CASCADE;
Executing (default): DROP TYPE IF EXISTS "enum_Users_type";
<-- hangs here with "default"