1 import { QueryTypes, Sequelize, Transaction } from 'sequelize'
3 // Sequelize always skip the update if we only update updatedAt field
4 function setAsUpdated (options: {
8 transaction?: Transaction
10 const { sequelize, table, id, transaction } = options
12 return sequelize.query(
13 `UPDATE "${table}" SET "updatedAt" = :updatedAt WHERE id = :id`,
15 replacements: { table, id, updatedAt: new Date() },
16 type: QueryTypes.UPDATE,