upgrade.rst 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. .. _monitor_upgrade:
  2. Upgrading
  3. =========
  4. The monitoring extension uses Hibernate to persist request data. Changes to the extension over time affect the structure of
  5. the underlying database, which should be taken into consideration before performing an upgrade. Depending on the nature of
  6. changes in an upgrade, it may involve manually making changes to the underlying database before deploying a new version of
  7. the extension.
  8. The sections below provides a history of such changes, and recommended actions that should be taken as part of the upgrade.
  9. Upgrades are grouped into two categories:
  10. * **minor** upgrades that occur during a minor GeoServer version change, for example going from 2.1.2 to
  11. 2.1.3. These changes are backward compatible in that no action is specifically required but potentially
  12. recommended. In these cases performing an upgrade without any action still result in the monitoring
  13. extension continuing to function.
  14. * **major** upgrades that occur during a major GeoServer version change, for example going from 2.1.2 to
  15. 2.2.0. These changes *may* be backward compatible, but not necessarily. In these cases performing an upgrade
  16. without any action could potentially result in the monitoring extension ceasing to function, and may result
  17. in significant changes to the underlying database.
  18. For each change the following information is maintained:
  19. * The released version containing the change
  20. * The date of the change
  21. * The subversion revision of the change
  22. * The jira issue referring to the change
  23. The date and subversion revision are especially useful if a nightly build of the extension is being used.
  24. Minor upgrades
  25. --------------
  26. Column ``resource`` renamed to ``name`` in ``request_resources`` table
  27. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  28. * *Version*: n/a, extension still community status
  29. * *Date*: Dec 09, 2011
  30. * *Subversion revision*: 16632
  31. * *Reference*: :geos:`4871`
  32. Upgrading without performing any action will result in the ``name`` column being added to the ``request_resources`` table,
  33. leaving the ``resource`` column intact. From that point forward the ``resource`` column will essentially be ignored.
  34. However no data from the ``resource`` column will be migrated, which will throw off reports, resource access statistics,
  35. etc... If you wish to migrate the data perform one of the following actions two actions.
  36. The first is a *pre* upgrade action that involves simply renaming the column before deploying the new monitoring
  37. extension::
  38. ALTER TABLE request_resources RENAME COLUMN resource to name;
  39. Alternatively the migration may occur *post* upgrade::
  40. UPDATE TABLE request_resources SET name = resource where name is NULL;
  41. ALTER TABLE request_resources DROP COLUMN resource;
  42. Column ``remote_user_agent`` added to ``request`` table
  43. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  44. * *Version*: n/a, extension still community status
  45. * *Date*: Dec 09, 2011
  46. * *Subversion revision*: 16634
  47. * *Reference*: :geos:`4872`
  48. No action should be required here as Hibernate will simply append the new column to the table. If for some reason this does
  49. not happen the column can be added manually::
  50. ALTER TABLE request ADD COLUMN remote_user_agent VARCHAR(1024);
  51. Major upgrades
  52. --------------