Commit 539bee53 authored by mfer's avatar mfer

changed uid column from varchar to int

parent df6854fe
......@@ -6,7 +6,7 @@ function bloginfo_install() {
case 'mysql':
case 'mysqli':
$ins = db_query('CREATE TABLE {bloginfo} ( '.
'uid varchar(10) NOT NULL, '.
'uid int(10) NOT NULL, '.
'title varchar(128) NOT NULL, '.
'description text NOT NULL, '.
"format int NOT NULL default '0',".
......@@ -15,7 +15,7 @@ function bloginfo_install() {
break;
case 'pgsql':
$ins = db_query("CREATE TABLE {bloginfo} (
\"uid\" varchar(10) NOT NULL,
\"uid\" int(10) NOT NULL,
\"title\" varchar(128) NOT NULL,
\"description\" text NOT NULL,
\"format\" int NOT NULL default '0',
......@@ -54,4 +54,18 @@ function bloginfo_update_1(){
}
return $items;
}
function bloginfo_update_2() {
$items = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
db_change_column($items, 'bloginfo', 'uid', 'uid', 'int', array('not null' => TRUE));
break;
case 'mysql':
case 'mysqli':
$items[] = update_sql("ALTER TABLE {bloginfo} CHANGE uid uid INT( 10 ) NOT NULL");
break;
}
return $items;
}
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment