UNPKG

@grouparoo/core

Version:
13 lines (12 loc) 558 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { up: async (queryInterface) => { // Kick profiles back to "pending" if they're ready but their imports are not await queryInterface.sequelize.query(`UPDATE "profiles" SET "state"='pending' WHERE "state"='ready' AND "id" IN (SELECT DISTINCT("profileId") FROM "imports" WHERE "exportedAt" IS NULL AND "profileUpdatedAt" IS NULL AND "groupsUpdatedAt" IS NULL)`); }, down: async function () { // nothing to do }, };