mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-07-19 09:21:56 +00:00
the bulk insert was returning empty array, so switch to selecting the newly inserted row before more bulk inserts
This commit is contained in:
parent
357fdd99dc
commit
c864afaf4f
|
@ -18,7 +18,9 @@ export default {
|
|||
licensePath: "/licenses/cc_by-nc_4.0.txt",
|
||||
}
|
||||
]))
|
||||
.then(packId => {
|
||||
.then(() => queryInterface.rawSelect('dimension_sticker_packs', { where: { name: "Loading Artist" } }, ['id']))
|
||||
.then(packIds => {
|
||||
const packId = Array.isArray(packIds) ? packIds[0] : packIds;
|
||||
return queryInterface.bulkInsert("dimension_stickers", [
|
||||
{
|
||||
packId: packId,
|
||||
|
@ -446,4 +448,4 @@ export default {
|
|||
down: (_queryInterface: QueryInterface) => {
|
||||
throw new Error("there is no going back");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user