Migration des competence
Migration de Ecriture en Écriture, sinon les combo de sélection de compétences ne trouvent pas la compétence
This commit is contained in:
parent
3d49a3de11
commit
acfab362a0
@ -614,7 +614,7 @@ class _12_0_37_MigrationAlchimieEtat extends Migration {
|
|||||||
return ['Alchimie', 'Repos', 'Soin', 'Autre'].includes(categorie) ? 'Liquide' : 'Autre'
|
return ['Alchimie', 'Repos', 'Soin', 'Autre'].includes(categorie) ? 'Liquide' : 'Autre'
|
||||||
}
|
}
|
||||||
|
|
||||||
async migratePotion(potion) {
|
migratePotion(potion) {
|
||||||
const newCategorie = this.mappingCategorie(potion.system.categorie)
|
const newCategorie = this.mappingCategorie(potion.system.categorie)
|
||||||
return {
|
return {
|
||||||
_id: potion.id,
|
_id: potion.id,
|
||||||
@ -625,6 +625,19 @@ class _12_0_37_MigrationAlchimieEtat extends Migration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class _12_0_38_TachesEcriture extends Migration {
|
||||||
|
get code() { return "migration-tache-ecriture" }
|
||||||
|
get version() { return "12.0.38" }
|
||||||
|
|
||||||
|
async migrate() {
|
||||||
|
await this.applyItemsUpdates(items => items
|
||||||
|
.filter(it => [ITEM_TYPES.tache, ITEM_TYPES.livre, ITEM_TYPES.oeuvre, ITEM_TYPES.meditation].includes(it.type) )
|
||||||
|
.filter(it => it.system.competence == 'Ecriture')
|
||||||
|
.map(it => { return { _id: it.id, 'system.competence': 'Écriture' } })
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class Migrations {
|
export class Migrations {
|
||||||
static getMigrations() {
|
static getMigrations() {
|
||||||
return [
|
return [
|
||||||
@ -647,6 +660,7 @@ export class Migrations {
|
|||||||
new _12_0_26_MigrationVoieSorts(),
|
new _12_0_26_MigrationVoieSorts(),
|
||||||
new _12_0_32_MigrationRaces(),
|
new _12_0_32_MigrationRaces(),
|
||||||
new _12_0_37_MigrationAlchimieEtat(),
|
new _12_0_37_MigrationAlchimieEtat(),
|
||||||
|
new _12_0_38_TachesEcriture()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user