Skip to content

Instantly share code, notes, and snippets.

@travist
Created November 6, 2017 19:49
Show Gist options
  • Save travist/1ec970faf2bbea3d076bbe16ddd1c951 to your computer and use it in GitHub Desktop.
Save travist/1ec970faf2bbea3d076bbe16ddd1c951 to your computer and use it in GitHub Desktop.
Data migrate
import { async } from 'async';
import Formio from 'formiojs';
let destForm = new Formio('https://myproject.form.io/dest');
let formio = new Formio('https://myproject.form.io/myform');
formio.loadSubmissions({params: {
limit: 1000000
}}).then(function(submissions) {
async.eachSeries(submissions, (submission, next) => {
destForm.saveSubmission(submission).then(next);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment