"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get down () {
        return down;
    },
    get up () {
        return up;
    }
});
const _sequelize = require("sequelize");
async function up(query) {
    await query.addColumn('sync_sessions', 'snapshot_dropped_at', {
        type: _sequelize.DataTypes.DATE,
        allowNull: true
    });
    await query.sequelize.query(`
    CREATE INDEX sync_sessions_pending_snapshot_cleanup_idx
      ON sync_sessions (completed_at)
      WHERE errors IS NOT NULL AND snapshot_dropped_at IS NULL;
  `);
}
async function down(query) {
    await query.sequelize.query(`DROP INDEX IF EXISTS sync_sessions_pending_snapshot_cleanup_idx;`);
    await query.removeColumn('sync_sessions', 'snapshot_dropped_at');
}

//# sourceMappingURL=1776908908321-addSnapshotDroppedAtToSyncSessions.js.map