Is it possible to copy a documents _id to a new field as a string using mongoose-migrate?
async function up() {
await this('guides').updateMany({}, { '$set': {slug: '$_id'}}, {multi: true});
}
This is just ends up setting the field to the string '$_id' instead of the string value of the id. The schema of slug requires it to be a string rather than an objectId