function biblio_update_22 in Bibliography Module 6
Same name and namespace in other branches
- 5 biblio.install \biblio_update_22()
- 6.2 biblio.install \biblio_update_22()
File
- ./
biblio.install, line 1286 - Install file for biblio module
Code
function biblio_update_22() {
global $db_type;
$result = array();
if ($db_type == 'pgsql') {
$result[] = update_sql("alter table {biblio} alter column `biblio_custom1` type text ;");
$result[] = update_sql("alter table {biblio} alter column `biblio_custom2` type text ;");
$result[] = update_sql("alter table {biblio} alter column `biblio_custom3` type text ;");
$result[] = update_sql("alter table {biblio} alter column `biblio_custom4` type text ;");
$result[] = update_sql("alter table {biblio} alter column `biblio_custom5` type text ;");
$result[] = update_sql("alter table {biblio} alter column `biblio_custom6` type text ;");
$result[] = update_sql("alter table {biblio} alter column `biblio_custom7` type text ;");
}
else {
$result[] = update_sql("alter table {biblio} modify `biblio_custom1` text ;");
$result[] = update_sql("alter table {biblio} modify `biblio_custom2` text ;");
$result[] = update_sql("alter table {biblio} modify `biblio_custom3` text ;");
$result[] = update_sql("alter table {biblio} modify `biblio_custom4` text ;");
$result[] = update_sql("alter table {biblio} modify `biblio_custom5` text ;");
$result[] = update_sql("alter table {biblio} modify `biblio_custom6` text ;");
$result[] = update_sql("alter table {biblio} modify `biblio_custom7` text ;");
}
$result[] = update_sql("UPDATE {biblio_fields} SET type = 'textarea',size=60,maxsize=65535 WHERE name LIKE 'biblio_custom%';");
$result[] = update_sql("ALTER TABLE {biblio} ADD `biblio_auth_address` text ;");
$result[] = update_sql("ALTER TABLE {biblio} ADD `biblio_remote_db_name` varchar(255) default NULL;");
$result[] = update_sql("ALTER TABLE {biblio} ADD `biblio_remote_db_provider` varchar(255) default NULL;");
$result[] = update_sql("ALTER TABLE {biblio} ADD `biblio_label` varchar(255) default NULL;");
$result[] = update_sql("ALTER TABLE {biblio} ADD `biblio_access_date` varchar(255) default NULL;");
$result[] = update_sql("INSERT INTO {biblio_fields} (`fid`,`name`,`title`,`common`,`type`,`size`,`maxsize`,`hint`,`required`,`visible`,`autocomplete`,`weight`) VALUES\n (47,'biblio_auth_address','Author Address',0,'textarea',60,65535,'',0,0,0,178),\n (48,'biblio_remote_db_name','Remote Database Name',0,'textfield',60,255,'',0,0,0,176),\n (49,'biblio_remote_db_provider','Remote Database Provider',0,'textfield',60,255,'',0,0,0,177),\n (50,'biblio_label','Label',0,'textfield',60,255,'',0,0,0,178),\n (51,'biblio_access_date','Access Date',0,'textfield',60,255,'',0,0,0,179)\n ;");
return $result;
}