Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In netarchivesuite_init.sql , make the necessary postgresql schema change. Increment the version of the relevant table(s) in the schemaversions table by 1. Note that the script is only used for new, clean, install of NAS, so this doesn't address the issue of how you upgrade existing installation.
  2. Update createfullhddb.mysql and createfullhddb.sql to parallel the changes you made in the postgresql schema.
  3. In HarvesterDatabaseTables.java, update the required version of your table(s).
  4. Look at the method DBSpecifics.updateTable(). The list of else/ifs at the end should include a call to upgrade your table(s). If it doesn't, add the method and call to the class.
  5. For each table upgrade a specific asbtract migrate<tablename>v<N>to><N+1>() method to DBSpecifics. (Rarely you may be able to add it as a concrete method if the implementation is the same for all dbs). The upgradeTable method you created/edited in step 4 should explicitly call the new migrate method.
    1. Note that Nicholas has created a fantastic helper-method HarvestDBConnection.executeSql(...) which updates a database schema from an externally supplied .sql file. See usages in the codebase.
  6. Implemement the migrate method in every implementing class of DBSpecifics.