You are here

function forum_access_update_6106 in Forum Access 7

Same name and namespace in other branches
  1. 6 forum_access.install \forum_access_update_6106()

Change our {acl} table records from 'name' to 'number' (D6 legacy).

File

./forum_access.install, line 164
Install, update and uninstall functions for the forum_access module.

Code

function forum_access_update_6106() {
  db_update('acl')
    ->expression('number', 'name')
    ->condition('module', 'forum_access')
    ->isNotNull('name')
    ->execute();
  db_update('acl')
    ->fields(array(
    'name' => NULL,
  ))
    ->condition('module', 'forum_access')
    ->isNotNull('name')
    ->execute();
}