function domain_update_3 in Domain Access 5
Updates from 5.x.1.2 to 5.x.1.3. This change affects the size of the columns for 'subdomain' and 'sitename'. See http://drupal.org/node/244142
File
- ./
domain.install, line 139 - Install file.
Code
function domain_update_3() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {domain} CHANGE subdomain subdomain varchar(255) NOT NULL default ''");
$ret[] = update_sql("ALTER TABLE {domain} CHANGE sitename sitename varchar(255) NOT NULL default ''");
break;
case 'pgsql':
db_change_column($ret, 'domain', 'subdomain', 'subdomain', 'varchar(255)', array(
'not null' => TRUE,
'default' => "''",
));
db_change_column($ret, 'domain', 'sitename', 'sitename', 'varchar(255)', array(
'not null' => TRUE,
'default' => "''",
));
break;
}
return $ret;
}