Jd/Convert

From J Wiki
Jump to: navigation, search
Jd | Overview | General | Ops | Admin | Guide | Technical | Release | Convert | License | Support

Jd 4.1 is incompatible with databases created under previous versions. Jd4 code will not open a Jd3 database and vice versa.

To continue working with databases created with Jd 3.3 (and earlier) you must:

  • rename ~addons/data/jd to ~addons/data/jd3

And then, when you want to work with a Jd3 database:

  • load'~addons/data/jd3/jd.ijs'

When Jd 4.1 is released, an update will overwrite addons/data/jd with the Jd4 codebase. After that point, update can't give you a jd3 folder. You can create it by downloading the appropriate file from jd3 zips and unpacking in a temp folder, renaming jd to jd3 and then moving it to your addons folder.

See Release for change details.

The Jd 4.1 release has conversion tools to migrate a Jd3 database to a Jd4. The conversion is done in place and only works in the one direction.

Conversion:

start J
load 'jd'
jd 'list version' NB. verify 4.1
load '~addons/data/jd/tools/convert.ijs'
dryrun '~temp/jd/test' NB. dry run this db and report details
dryrun '~temp/jd'      NB. dry run all jd3 dbs in folder
   
DO NOT conrun UNTIL dryrun IS CLEAN!
BACKUP!
  
conrun '~temp/jd/test' NB. convert this db in place and report details
conrun '~temp/jd'      NB. convert all jd3 dbs in folder

Conversion summary:

  • jdactive col dropped and deleted rows compressed out
  • jd... cols (ref/reference/hash/...) dropped
  • cols with type time or enum dropped
  • jd'ref ...' done for jdref and jdreference cols
  • dryrun failure leaves db untouched
  • conrun failure probably leaves db damaged - neither jd3 nor jd4 compatible