UPDATE
======

Version 7.x-2.0-beta18 -> 7.x-2.0-beta19
-----------------------------------------------

Release notes:

  - Updated api_users resource to display the total users count returned from a
    set variable instead of querying the database for each API call.

Update steps:

  Update steps:

  1. Deploy new code

  2. Run the update script.

       drush updb -y

Version 7.x-2.0-beta17 -> 7.x-2.0-beta18
-----------------------------------------------

Release notes:

  - Updated petitions_data to implement petitions_signatures_display settings and formatting

Update steps:

  Update steps:

  1. Deploy new code

  2. Run the update script.

       drush updb -y

Version 7.x-2.0-beta16 -> 7.x-2.0-beta17
-----------------------------------------------

Release notes:

  - Updated petitions_data to filter flagged petitions


Update steps:

  Deploy new code

Version 7.x-2.0-beta11 -> 7.x-2.0-beta16
-----------------------------------------------

Release notes:

  - Move shunt module into contrib
  - Updated petitions.info to include newer dependencies on install
  - Added api_errors module for API error responses
  - Added new parameters to make data API more flexible
  - Convert API properties and params to camelCase
  - Make API obey site administrator defined public petition thresholds
  - Includes new Services Documentation config settings form


Update steps:

  Uninstall shunt:
    drush dis shunt
    drush pm-uninstall shunt

  Deploy new code

  Re-install shunt:
    drush en shunt


Version 7.x-2.0-beta9 -> 7.x-2.0-beta11
-----------------------------------------------

 Release notes:

   - Bug fix: Filter unsupported non-latin characters out from API results
   - Minor CSS change: Added styles for the new API Gallery Page (White House
 pecific,
     this will be moved somewhere else in the future)
   - Bug fix: Filter for 'zip' field, limit to 31 characters
   - Moved services_documentation module into contrib

 Update steps:

   Uninstall services_documentation:
     drush dis services_documentation
     drush pm-uninstall services_documentation

   Deploy new code. Clear cache. Re-install services_documentation module.
     drush en services_documentation


Version 7.x-2.0-beta8 -> 7.x-2.0-beta9
-----------------------------------------------

Release notes:

  - Added count, offset, and limit to the metadata for the petitions index method

Update steps:

  1. Deploy new code. There are no additional update steps.

Version 7.x-2.0-beta7 -> 7.x-2.0-beta8
-----------------------------------------------

Release notes:

  - Updated Drupal core to 7.21
  - Removed clean_mongo, clean_mongo() calls, and added requirement for Mongo 2.2.4
  - Fixed a bug that caused the API to produce links with the wrong $base_url
    when the API is exposed on a different domain by adding a settings field
  - Updated shunt module to implement shunt_enable() and shunt_disable() as
    described in README roadmap, enable a drush interface, and update the
    configuration path.
  - Updated shunt_api module to prevent memcache problems when shunt is tripped.

Update steps:

  1. Prior to deployment, disable and uninstall clean_mongo:

       drush dis clean_mongo -y
       drush pm-uninstall clean_mongo

  2. Run the update script.

       drush updb -y
       drush cc all

Version 7.x-2.0-beta6 -> 7.x-2.0-beta7
-----------------------------------------------

Release notes:

  - Updated the path to the Petitions API endpoint
  - Added the Shunt module

Update steps:

  1. Clear caches.

       drush cc all

Version 7.x-2.0-beta5 -> 7.x-2.0-beta6
-----------------------------------------------

The only change in beta6 is UPDATE.txt instructions. 2.0-beta5, will break your site if
you don't manually enable the new Clean Mongo module. To update safely, enable
the Clean Mongo module.

  Do this via the GUI here:

    Administer -> Modules -> Clean Mongo

  Or via Drush like this:

    drush en clean_mongo -y

Version 7.x-2.0-beta4 -> 7.x-2.0-beta5
-----------------------------------------------

Release notes:

  - Fixed a bug producing links to non-existent URLs via Short URLs for Responses
  - Updated services_documentation to support example implementations of API resources
  - Added framework for a Response resource to the Petitions API
  - Added a comment to the Services module patch included with drupal-org.make
  - Patched a security vulnerability in MongoDB (equivalent of a SQL injection)

Update steps:

  1. Run the update script to enable new modules.

       drush updb -y

Version 7.x-2.0-beta1 -> 7.x-2.0-beta4 (skipping beta2 and beta3)
-----------------------------------------------

Release notes:

  - Update Petitions Data and Petitions Resource modules to return signature data and minor fixes

Update steps:

  1. Deploy the latest code. No other steps are necessary.

Version 7.x-1.0 -> 7.x-2.0-beta1
-----------------------------------------------

Release notes:

  - Add custom Petitions Data, Petitions Resource, and Petitions API Authentication modules
  - Rename custom Users Resource module
  - Update custom Services Documentation and Petitions Statistics - Users modules and Petitions API feature

Update steps:

  0. Prior to deploying the updated profile, disable and uninstall api_resource_users (optional but suggested)

       drush dis -y api_resource_users

  1. Run the update script to enable new modules.

       drush updb -y

  2. Flush caches.

       drush cc all

Version 7.x-1.0-alpha31 -> 7.x-1.0-alpha32
-----------------------------------------------

Release notes:

  - Add custom Petitions Profanity and Is Profane modules
  - Update user registration form to disable user input for city/state
  - Update user registration and user profile forms to disable user input for city/state/country
  - Add options to define the display of fields on the user registration and user profile forms
  - Add options to define the display of fields on the user profile page
  - Update Colorbox contrib module
  - Important: When updating to this version of the Colorbox module you need to
    update the Colorbox plugin to v1.3.21.1 or later as well.
  - Replaced hardcoded references to wethepeople@whitehouse.gov with site_mail.

Update steps:

  1. Run the update script.

       drush updb -y

  2. Enable new modules.

       drush en petitions_profanity is_profane -y

  3. Flush caches.

       drush cc all

Version 7.x-1.0-alpha30 -> 7.x-1.0-alpha31
-----------------------------------------------

Release notes:

  - Add custom Petitions Signatures Display module
  - Updated signatures location display to use stored values associated with zip code

Update steps:

  1. Enable new modules.

       drush en petitions_signatures_display -y

Version 7.x-1.0-alpha29 -> 7.x-1.0-alpha30
-----------------------------------------------

Release notes:

  - Add Services module
  - Add custom Services Documentation, Users Resource, and Petitions
    Statistics - Users modules
  - Add Petitions API feature

Update steps:

  1. Enable new modules.

       drush en services rest_server services_documentation api_resource_users petitions_stats_users petitions_api -y

  2. Configure the Request URL to use the site's URL and define the Starting Year at /admin/config/services/stats/users

Version 7.x-1.0-alpha28 -> 7.x-1.0-alpha29
-----------------------------------------------

Release notes:

  - Update petitions signature reports

Update steps:

  1. Clear Drupal Caches

       drush cc all

Version 7.x-1.0-alpha25 -> 7.x-1.0-alpha28
-----------------------------------------------

Release notes:

  - Add Colorbox and Libraries modules
  - Add Colobox plugin
  - Add a custom module to alert users upon exiting the domain
  - Update various theme elements

Update steps:

  1. Enable new contrib modules.

       drush en colorbox libraries gatekeeper -y

  2. Clear Drupal Caches

       drush cc all

  3. Update Databases

       drush updb

Version 7.x-1.0-alpha24 -> 7.x-1.0-alpha25
-----------------------------------------------

Release notes:

  - Add the Global Redirect module
  - Update the shortenurl service consumption method

Update steps:

  1. Enable new contrib modules.

       drush en globalredirect -y

Version 7.x-1.0-alpha22 -> 7.x-1.0-alpha23
-----------------------------------------------

Release notes:

  - Rename petition install profile to petitions
  - Remove legacy petitions theme
  - Remove duplicate buttom from deleted petitions
  - Remove MongoDB patch that no longer needs to be maintained

Update steps:

  Before you update your code base:

  1. Log in and put your site into maintenace mode


  2. In a few minutes, the legacy "petitions" theme will be removed from the
     code base. Disable it before running the update (we assume you are using
     petitions44 or something other then petitions as your default theme.  If
     that is not true, you will need to enable another theme):

       drush dis petitions


  3. Disable contrib modules that may cause issues when the directory is
     reorganized.

       drush dis entity -y
       drush dis entitycache -y
       drush dis context -y
       drush dis feeds -y


  4. Clear ALL caches.

       drush eval "cache_clear_all('*', NULL, TRUE)"


  5. Change file paths in the database. Update.php and registry rebuild normally
     do this, but sometimes they need a little help.

       drush sqlq 'UPDATE system SET filename = replace (filename, "profiles/petition", "profiles/petitions");'
       drush sqlq 'UPDATE registry SET filename = replace (filename, "profiles/petition", "profiles/petitions");'
       drush sqlq 'UPDATE registry_file SET filename = replace (filename, "profiles/petition", "profiles/petitions");'


  6. Add this line to your settings.php

       $conf['install_profile'] = 'petitions';

     NOTE: If you have anything in your settings.php or anywhere else in you Petitions installation hardcoded to
     profiles/petition (for example the path to a memcache module include file), replace that with 'profile/petitions'
     too.


  Now you are ready to update:

  7. Deploy 7.x-1.0-alpha23 in your environment.


  8. Clear your cache, run update.php, and then run registry rebuild.

       drush cc all
       drush updb
       drush rr


  9. Re-enable modules previously disabled (and the dependencies disabled with them).

       drush en entity entity_token rules logintoboggan_rules profile2 petitions_user_registration rules_admin wh_user_profile wh_petitions wh_contexts wh_zipcodelookup wh_core wh_misc wh_petition_reporting wh_petition_tool wh_profile_migrate wh_response -y

       drush en entitycache context feeds feeds_ui taxonomy_sync -y


  10. Clear your cache, run update.php, and then run registry rebuild.

       drush cc all
       drush updb
       drush rr


  11. Put your site back online.
