-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add a Migration system and fix #172 #184
Conversation
Traduction du fichier migrations.md (#184 )
Hello ! |
Yes, right ! I did'nt thought of it this way. :) Co-authored-by: Aitor Balmaseda <32964371+Eryx5502@users.noreply.github.com>
documentation FR pour migrations.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disculpa la tardanda @Eryx5502. ¡Esto es una maravilla! Aprobado
if (game.settings.get('animabf', ABFSettingsKeys.DEVELOP_MODE)) { | ||
console.warn( | ||
`AnimaBF | Migration ${migration.version} needs not to be applied, current system migration version is ${currentVersion}.` | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Lo unico que me "preocupa" son los ficheros que están en |
This is needed for migrations creating/deleting (inner) items from the actor, for instance.
There was a problem getting the updateData with `.toObject()` from the modified actor. When modifying the actor inplace without calling `.update(...)` the actor source (the Document DataSource) is not updated, and `.toObject()` returns the old `actor.system`.
fc496bb
to
cd6339a
Compare
To solve #172, a migration of the actor data needs to be performed. This led me to introduce a Migration system heavily inspired by Pathfinder's one, yet simplified and applied to our case.
A documentation page (both in Spanish and English has been added, explaining in detail how the system works and how to write new migrations. I didn't feel able to write also the French translation (although I'll be happy to review it if @LIARDM has time for translating).
The functions migrating
items
andtokens
need still to be written, but I thought it's ok to do that when we have a particular migration for them on mind. Also, the ability to migrate actor data is needed for PR #181, which introduces some urgency.Finally, a migration is added to reassign the properties
system.general.settings.fumbles.value
and thesystem.general.settings.openRolls.value
, solving the original issue.