Skip to content
This repository was archived by the owner on Sep 20, 2025. It is now read-only.

Commit 61b3e1d

Browse files
committed
Add missing queries to transaction in demo-products seeder
1 parent 8e5425c commit 61b3e1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/seeders/v1/20250705173423-demo-products.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
for (let i = 0; i < 30; i++) {
1212
const category = await queryInterface.sequelize.query(
1313
"SELECT id FROM categories ORDER BY rand() LIMIT 1",
14-
{ type: Sequelize.QueryTypes.SELECT },
14+
{ type: Sequelize.QueryTypes.SELECT, transaction },
1515
);
1616

1717
if (0 === category.length) {
@@ -20,7 +20,7 @@ module.exports = {
2020

2121
const manufacturer = await queryInterface.sequelize.query(
2222
"SELECT id FROM manufacturers ORDER BY rand() LIMIT 1",
23-
{ type: Sequelize.QueryTypes.SELECT },
23+
{ type: Sequelize.QueryTypes.SELECT, transaction },
2424
);
2525

2626
if (0 === manufacturer.length) {

0 commit comments

Comments
 (0)