Compare commits

...

1 Commits
0.4.1 ... 0.4.2

Author SHA1 Message Date
Stefan Zermatten
ef44f6c1a5 Fixed migration of attack data 2015-05-19 11:44:06 +02:00

View File

@@ -65,6 +65,7 @@ Migrations.add({
up: function() { up: function() {
//update attacks //update attacks
Attacks.find({}).forEach(function(attack) { Attacks.find({}).forEach(function(attack) {
if (!attack.damage && attack.damageDice && attack.damageBonus){
var newDamage = attack.damageDice + var newDamage = attack.damageDice +
" + {" + attack.damageBonus + "}"; " + {" + attack.damageBonus + "}";
Attacks.update( Attacks.update(
@@ -79,6 +80,7 @@ Migrations.add({
}, },
}, },
{validate: false}); {validate: false});
}
}); });
//update Items //update Items
Items.update( Items.update(