Data Lifecycle - Migrations - called expansion needed
Posted: Sun Oct 09, 2016 7:39 am
Firstly Thank you for adding data lifecyle to the the API for quick reference
Can the http://lua-api.factorio.com/latest/Data-Lifecycle.html #2 migrations section be expanded to list when the migration files are run (not scope as that is listed, but when they are called to run). similar to how the on_init and on_config_changed etc events are listed
This is somewhat addressed when you follow the migrations link to http://lua-api.factorio.com/latest/Migrations.html "Migrations are a way to fixup a save file which was used in an older version of the game or mod"
Since I am not in a spot to test tonight and I have the memory of zombie and I am at a point where I will need migrations in a mod.. I am not sure if this means
A. Migrations are run before on_init/configuration_changed - on "new" or "existing" worlds
B. Migrations are run before on_init/configuration_changed - but only on "existing" worlds -- This is my guess as it would be consistent with how on_configuration_changed works
C. Migrations are run before on_configuration_changed - i.e. only if the mod was previously installed
D. Some other option
Also TYPO in http://lua-api.factorio.com/latest/Data-Lifecycle.html "2. Migrations"
migration haves been applied.
should possibly be
migrations have been applied
Can the http://lua-api.factorio.com/latest/Data-Lifecycle.html #2 migrations section be expanded to list when the migration files are run (not scope as that is listed, but when they are called to run). similar to how the on_init and on_config_changed etc events are listed
This is somewhat addressed when you follow the migrations link to http://lua-api.factorio.com/latest/Migrations.html "Migrations are a way to fixup a save file which was used in an older version of the game or mod"
Since I am not in a spot to test tonight and I have the memory of zombie and I am at a point where I will need migrations in a mod.. I am not sure if this means
A. Migrations are run before on_init/configuration_changed - on "new" or "existing" worlds
B. Migrations are run before on_init/configuration_changed - but only on "existing" worlds -- This is my guess as it would be consistent with how on_configuration_changed works
C. Migrations are run before on_configuration_changed - i.e. only if the mod was previously installed
D. Some other option
Also TYPO in http://lua-api.factorio.com/latest/Data-Lifecycle.html "2. Migrations"
migration haves been applied.
should possibly be
migrations have been applied