(maybe) upgrade the kernel state to the current schema
This function is responsible for bringing the kernel's portion of
swing-store (kernelStorage) up to the current version. The host app
must call this each time it launches with a new version of
swingset, before using makeSwingsetController() to build the
kernel/controller (which will throw an error if handed an old
database). It is ok to call it only on those reboots, but it is
also safe to call on every reboot, because upgradeSwingset() is a
no-op if the DB is already up-to-date.
If an upgrade is needed, this function will modify the DB state, so
the host app must be prepared for export-data callbacks being
called during the upgrade, and it is responsible for doing a
hostStorage.commit() afterwards.
(maybe) upgrade the kernel state to the current schema
This function is responsible for bringing the kernel's portion of swing-store (kernelStorage) up to the current version. The host app must call this each time it launches with a new version of swingset, before using makeSwingsetController() to build the kernel/controller (which will throw an error if handed an old database). It is ok to call it only on those reboots, but it is also safe to call on every reboot, because upgradeSwingset() is a no-op if the DB is already up-to-date.
If an upgrade is needed, this function will modify the DB state, so the host app must be prepared for export-data callbacks being called during the upgrade, and it is responsible for doing a
hostStorage.commit()
afterwards.