[bugfix] correct sku relation to cards
This commit is contained in:
@@ -234,4 +234,7 @@ where not exists (select 1 from cards where product_id=t.product_id and variant=
|
||||
`);
|
||||
console.log(`Inserted ${inserts.rowCount} rows into cards table`);
|
||||
|
||||
const skuUpdates = await db.execute(sql`update skus s set card_id = c.card_id from cards c where s.product_id = c.product_id and s.variant = c.variant and s.card_id is distinct from c.card_id`);
|
||||
console.log(`Updated ${skuUpdates.rowCount} rows in skus table`);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user