USFS-PNW / Fia-Biosum-Manager

User interface and main code repository for Biosum
http://biosum.info/
Other
3 stars 3 forks source link

Revisit BioSum backwards compatibility #3

Open lbross opened 8 years ago

lbross commented 8 years ago

From Jeremy: Larry has tried to make sure that each version of BioSum can read older version files (there have been a great many changes made to the software over 10 years, so for this to work, he must have to check and adapt a lot of data, I would guess). This data migration is VERY slow, sometimes taking many hours, and it is never clear that the program is not in an endless loop of some sort, so sometimes I give up on it.

We should change the migration function to not reach quite so far back version wise, and streamline the migration processing if possible. BioSum looks at the application.version file to see what is the version of BioSum under which the project was created (or migrated to).

lbross commented 8 years ago

From Larry: The version control needs to be redone. It was a hastily developed process in order to convert older projects saved by older versions of BIOSUM to the current version of BIOSUM.

Upgrading projects to the current version is a necessity when dealing with BIOSUM projects that have a big investment of time and analysis. Much of the code can probably be eliminated. For example, it still checks and upgrades from RXs defined as A to Z.

The code for version control is in a class file called VERSION_CONTROL.CS.

lbross commented 8 years ago

After reviewing the code, recommend starting with a matrix of application version/database version compatibility. Larry says most of the code can be stripped out since a majority of the big changes occurred early on in the life of BIOSUM. He doesn't think there should be any BIOSUM projects that are less than BIOSUM version 5. Need to confirm this assumption.

Also recommend popping a MessageBox if the application determines an upgrade is needed. This would allow the user to avoid starting the conversion if they don't want to. They would also not be able to open that project, but they could choose another.

lbross commented 8 years ago

From conference call: It is okay to abandon projects created before 5.0. Will start by creating 2 matrices:

  1. application version vs. project version for 5.0 projects or later; Which project versions are compatible with which application version?
  2. upgrade application vs. project version for projects < 5.0; Which application version should be used to upgrade projects that are no longer readable by 5.5.5 or later? We assume that the user will install an older version of BioSum if they need to upgrade a project < 5.0.

MessageBox message to include prompt for installing and older version of BioSum if the project cannot be upgrade.

lbross commented 8 years ago

From @jsfried: We may also want to have BioSum version numbers associated with all BioSum tables unless we are certain that when opening a project in a newer version of BioSum than the project was created in, all needed updates will occur. Sara ran into an issue with a changed tree_species table (that hopefully won’t affect others since we are going to get that one locked down).

sloreno commented 8 years ago

I had an issue in Processor as well.

When I went to run processor in 5.7.4, in a project that was created in 5.7.2 or 5.7.3, I kept getting errors.

I needed to add two columns to the 'harvest_cost' table: _bc_vol_cf & bc_wtgt. And one column to the tree_vol_val table: place_holder.

After I added these columns Processor worked fine. It took a bit to figure out what the problem was, however.

A list of columns that needs to be added if you created a project in an older version, or having the updates occur upon opening a project in a newer version, would be very helpful!

On Thu, Aug 18, 2016 at 11:54 AM, Lesley notifications@github.com wrote:

From @jsfried https://github.com/jsfried: We may also want to have BioSum version numbers associated with all BioSum tables unless we are certain that when opening a project in a newer version of BioSum than the project was created in, all needed updates will occur. Sara ran into an issue with a changed tree_species table (that hopefully won’t affect others since we are going to get that one locked down).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/USFS-PNW/Fia-Biosum-Manager/issues/3#issuecomment-240821067, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9sRCZdeTkcJGjtR3t25pvEhpf6OZhBks5qhKptgaJpZM4Hr_0G .

lbross commented 8 years ago

The code in version_control.cs is supposed to handle issues such as those reported by @sloreno. But, as stated above, this code was originally written hastily and should be redone. The columns mentioned by @sloreno were added in v5.7.0 so I am curious how they could be missing from projects under more recent version numbers ... Not sure if this is worth pursuing.

It may make sense to record table schema changes in a central location since version control will likely not be rewritten soon. Perhaps this is already started somewhere?