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

Open
mpadula1990 opened this issue Mar 19, 2019 · 7 comments
Open

Version control, SCHEMA MIGRATION #5434

mpadula1990 opened this issue Mar 19, 2019 · 7 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@mpadula1990
Copy link

mpadula1990 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.

@georgesjamous
Copy link
Contributor

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.

@acinader
Copy link
Contributor

acinader 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) {
    db.createCollection('FeedItem')
        .then((collection) => {
            return collection.createIndexes(indexes);
        })
        .then(() => next())
        .catch(e => next(e));
};

exports.down = function(db, next){
    next();
};

@stale
Copy link

stale bot 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 as completed May 24, 2019
@davimacedo
Copy link
Member

I am reopening this one since similar features have been recurrently requested.

@davimacedo davimacedo reopened this Sep 13, 2019
@stale stale bot removed the wontfix label Sep 13, 2019
@davimacedo davimacedo added type:feature New feature or improvement of existing feature up for grabs labels Sep 13, 2019
@mihazs
Copy link

mihazs commented Sep 23, 2019

+1 for version control of schema.

@stale
Copy link

stale bot commented Nov 8, 2020

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 stale label Nov 8, 2020
@mtrezza mtrezza removed the stale label Nov 8, 2020
@Moumouls
Copy link
Member

A PR is on the road for this one as discussed here : https://community.parseplatform.org/t/possibility-to-set-class-level-permissions-via-file/1061/20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

7 participants