function webform_update_16 in Webform 5.2
Same name and namespace in other branches
- 6.2 webform.install \webform_update_16()
Add the submit button text and teaser columns. Remove redirect_post.
File
- ./
webform.install, line 544
Code
function webform_update_16() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$ret[] = update_sql('ALTER TABLE {webform} DROP redirect_post');
$ret[] = update_sql('ALTER TABLE {webform} ADD teaser tinyint NOT NULL DEFAULT 0 AFTER confirmation');
$ret[] = update_sql('ALTER TABLE {webform} ADD submit_text varchar(255) NULL DEFAULT NULL AFTER teaser');
break;
case 'pgsql':
$ret[] = update_sql('ALTER TABLE {webform} DROP redirect_post');
$ret[] = update_sql('ALTER TABLE {webform} ADD teaser smallint NOT NULL DEFAULT 0');
$ret[] = update_sql('ALTER TABLE {webform} ADD submit_text varchar(255) NULL DEFAULT NULL');
break;
}
return $ret;
}