Upgrading Schema in Dataphor

Dataphor has an upgrade system with versioning in libraries, but it has proven overly difficult to use and doesn't handle interlibrary upgrade ordering properly and so a simpler, largely manual scheme has arisen. It basically works like this:

  1. Make the changes to the D4 scripts
  2. Unregister w/o reconciliation (assuming library already registered)
  3. Register w/o reconciliation
  4. Run select DeviceReconciliationScript()
  5. Run the results in a SQLExecute('...'); script.

That's basically it, except that if your changes involve adding a required column, the script that results from the first DeviceReconciliationScript invocation will create the column nullable so that you can run a script to default the column. Running DeviceReconciliationScript again will result in a script that turns the column not nullable.

We do have plans to address this aspect in general.