redhen_org.install in RedHen CRM 8
Same filename and directory in other branches
Install & update hooks for the Redhen Org module.
File
modules/redhen_org/redhen_org.installView source
<?php
/**
* @file
* Install & update hooks for the Redhen Org module.
*/
/**
* Change the redhen org name to 255 characters.
*/
function redhen_org_update_8101() {
$table = 'redhen_org';
$revision_table = 'redhen_org_revision';
$column = 'name';
$max_length = 255;
// Alter value field length in fields table:
/** @var \Drupal\Core\Database\Connection $database_replica */
$database_replica = \Drupal::service('database.replica');
$database_replica
->query("ALTER TABLE `{$table}` CHANGE `{$column}` `{$column}` VARCHAR( {$max_length} )");
// Alter value field length in fields revision table:
$database_replica
->query("ALTER TABLE `{$revision_table}` CHANGE `{$column}` `{$column}` VARCHAR( {$max_length} )");
}
Functions
Name | Description |
---|---|
redhen_org_update_8101 | Change the redhen org name to 255 characters. |