Better DB Updates

Categories

Component ID

2765643

Component name

Better DB Updates

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

183

Component created

Component changed

Component body

Better DB Updates aims to solve the common problem of merge conflicts when multiple developers work in separate branches and need to add database updates. It does this by allowing modules to implement hook_better_updates_db_directory() and return a subdirectory to be scanned for database updates contained in individual files. The module also provides a drush command to run all updates, including better DB updates.

Example usage:

in your .module file:

/**
 * Implements hook_better_db_updates_directory()
 */
function test_better_db_updates_directory() {
  return 'updates';
}

In the updates directory under your module's directory, add a file called update_site_name.inc

<?php

/**
 * Update to the new site name
 */

variable_set('site_name', 'My Drupal Site');