function page_title_update_5203 in Page Title 5.2
File
- ./
page_title.install, line 120 - The Page Title install file, which controls the installation and uninstallation (and updates) of the Page Title module.
Code
function page_title_update_5203() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql('CREATE TABLE {page_title_old} AS SELECT * FROM {page_title}');
$ret[] = update_sql('DROP TABLE {page_title}');
$ret[] = update_sql('CREATE TABLE {page_title} (
type VARCHAR(15) NOT NULL DEFAULT "node",
id INT NOT NULL DEFAULT 0,
page_title VARCHAR(255) NOT NULL,
PRIMARY KEY (type, id)
) /*!40100 DEFAULT CHARACTER SET utf8 */;');
$ret[] = update_sql('INSERT INTO {page_title} (id, page_title) SELECT nid, page_title FROM {page_title_old}');
}
return $ret;
}