obs-portal/api/migrations/2020-12-01-1950-rebuild-track-data.js

16 lines
242 B
JavaScript

const Track = require('../src/models/Track');
module.exports = {
async up(next) {
for await (const track of Track.find()) {
await track.rebuildTrackDataAndSave();
}
next();
},
async down(next) {
next();
},
};