Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version control, SCHEMA MIGRATION #5434

mpadula1990 opened this issue Mar 19, 2019 · 3 comments


None yet
3 participants
Copy link

commented Mar 19, 2019

if i work with various enviroments (develop, staging and production) and I update the schema in develop, the JS SDK have a function to migrate to others enviroments with the differences?

sory for my english.


This comment has been minimized.

Copy link

commented Mar 20, 2019

Unfortunately no, you have to create your own schema migration script and run it on the target environment.

If in Develop you have additional classes or schema fields, and you have disabled the class creation, you have to create a migration script to add these new classes to the new environment.

parse is not aware of any other environment. Supposing that each one has its own database and server.


This comment has been minimized.

Copy link

commented Apr 2, 2019

I use the npm package: mongodb-migrate

Here is what one of my migrations looks like:

var mongodb = require('mongodb');

const indexes = [
        "key": {"_p_toUser": 1, "_rperm": 1, "postDate": -1, "_updated_at": -1},
        "background": true

exports.up = function (db, next) {
        .then((collection) => {
            return collection.createIndexes(indexes);
        .then(() => next())
        .catch(e => next(e));

exports.down = function(db, next){

This comment has been minimized.

Copy link

commented May 17, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 17, 2019

@stale stale bot closed this May 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.