So you don’t have to reset the database every time you change your schema.

Submitted by Zef Hemel on 30 March 2010 at 04:48

On 10 March 2011 at 15:43 Terje Pedersen tagged !senikk

On 10 March 2011 at 15:45 Terje Pedersen commented:

This feature is really needed.

Have you started working on this?


On 11 March 2011 at 11:17 Zef Hemel commented:

One of my colleagues’ research project is about automatically deriving data migrations. He ported his solution to mobl at one stage, but we never really put effort into getting it working. I’ll see if we can work on that. I see the necessity :)


On 16 June 2011 at 22:06 Zef Hemel commented:

Just an update: a simple data migration framework is in the works for 0.5. It’s pretty low-level at this point, but should work OK. Here’s some example code:


Migration.defineMigration(1, function(m : Migration) {
m.createEntity(“tasks::Task”);
m.addProperty(“tasks::Task”, “name”, “String”);
});

Migration.defineMigration(2, function(m : Migration) {
m.addProperty(“tasks::Task”, “done”, “Bool”, true);
});

Migration.defineMigration(3, function(m : Migration) {
m.createEntity(“tasks::Category”);
m.addProperty(“tasks::Task”, “category”, “tasks::Category”);
});

Migration.defineMigration(4, function(m : Migration) {
m.createEntity(“tasks::Tag”);
m.addProperty(“tasks::Tag”, “name”, “mobl::String”);
m.addManyToMany(“tasks::Task”, “tags”, “tasks::Tag”, “tasks”);
});

The migration is powered by persistence.js’ migrations plugin.


On 16 June 2011 at 22:06 Zef Hemel tagged 0.5.0

On 16 June 2011 at 22:08 Zef Hemel commented:

Needless to say, migrations will be applied automatically as the user loads the application (as needed).


On 21 June 2012 at 11:15 chris melman tagged 0.6.0

On 21 June 2012 at 11:16 chris melman tagged 0.6.0

On 21 June 2012 at 11:16 chris melman removed tag 0.5.0

On 20 January 2013 at 20:49 Brian Hayward tagged !bhayward

On 23 January 2013 at 01:46 removed tag data

Log in to post comments