News for hackers. Stuff that matters.
Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by diverightin63 on Tuesday September 22, 2015 @02:10PM (#10260429)
So, one thing holding me back from using MongoDB (and thus Meteor) is a lack of understanding how schema can be managed.

Say in MongoDB you are storing documents in a collection such as { property: "" }, and decide you want to change that to { property2: "" }. Does that mean you have to script a change to every document to convert these objects?

Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by hereandthere2 on Tuesday September 22, 2015 @06:05PM (#10262026)
in this case "renaming a field" it would be something like

`Collection.rename('property', 'property2')`

my syntax may be slightly off since i mostly use mongo thru a ruby orm but the basic idea is the same.

we handle these things by having a tasks we run each deployment (named after the deployment version) with the necessary db changes.

Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by coldtea on Tuesday September 22, 2015 @02:13PM (#10260451)
That's not data management. That's schema management (migration).

And yes, you have to script a change to every document.

Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by diverightin63 on Tuesday September 22, 2015 @02:35PM (#10260624)
Right. And I see. Are these managed by something like migrations?
Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by rralian on Tuesday September 22, 2015 @11:24PM (#10263172)
Meteor doesn't have migrations built in, but there is a package for it. https://atmospherejs.com/percolate/migrations
Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by coldtea on Tuesday September 22, 2015 @02:53PM (#10260775)
From my brief experience with Mongo no. But they are very easy to do in code.
Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by djmashko2 on Tuesday September 22, 2015 @02:19PM (#10260497)
As far as I know, this is an issue for every database, no? What are you currently using?
Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by X-Istence on Tuesday September 22, 2015 @02:27PM (#10260567)
Except that in every other database a migration like that changes a column, that's it.

In MongoDB you have to manually walk all your objects and migrate them.

Re:Announcing Meteor 1.2 – ES2015, Angular, React, and More by diverightin63 on Tuesday September 22, 2015 @02:24PM (#10260541)
Well, in relational SQL you would just do an ALTER on the column name.