obs-portal/old-api/migrations/2020-12-01-1950-rebuild-track-data.js
2021-11-22 09:50:33 +01:00

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();
},
};