How Lyra migrations work
mainLyra's migration system automatically transforms player data when the data format changes (e.g., adding fields, renaming, or restructuring).
When player data is loaded, Lyra follows this lifecycle:
- Checks which migrations have already run for that specific player.
- Runs any new migrations in the order they are defined.
- Records which migrations were applied to prevent re-running them.
- Validates the final resulting data against your defined schema.
Each migration runs exactly once per player, ensuring consistency across different sessions or servers.