1 import { QueryTypes, Transaction } from 'sequelize'
2 import { sequelizeTypescript } from '@server/initializers/database'
4 // Sequelize always skip the update if we only update updatedAt field
5 function setAsUpdated (table: string, id: number, transaction?: Transaction) {
6 return sequelizeTypescript.query(
7 `UPDATE "${table}" SET "updatedAt" = :updatedAt WHERE id = :id`,
9 replacements: { table, id, updatedAt: new Date() },
10 type: QueryTypes.UPDATE,