Skip to content
Snippets Groups Projects
Commit c38da788 authored by Steven Wittens's avatar Steven Wittens
Browse files

- #27985: make node type column bigger

parent 0c8d7422
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -402,7 +402,7 @@ CREATE TABLE moderation_votes ( ...@@ -402,7 +402,7 @@ CREATE TABLE moderation_votes (
CREATE TABLE node ( CREATE TABLE node (
nid int(10) unsigned NOT NULL auto_increment, nid int(10) unsigned NOT NULL auto_increment,
type varchar(16) NOT NULL default '', type varchar(32) NOT NULL default '',
title varchar(128) NOT NULL default '', title varchar(128) NOT NULL default '',
uid int(10) NOT NULL default '0', uid int(10) NOT NULL default '0',
status int(4) NOT NULL default '1', status int(4) NOT NULL default '1',
......
...@@ -402,7 +402,7 @@ CREATE TABLE moderation_votes ( ...@@ -402,7 +402,7 @@ CREATE TABLE moderation_votes (
CREATE TABLE node ( CREATE TABLE node (
nid SERIAL, nid SERIAL,
type varchar(16) NOT NULL default '', type varchar(32) NOT NULL default '',
title varchar(128) NOT NULL default '', title varchar(128) NOT NULL default '',
uid integer NOT NULL default '0', uid integer NOT NULL default '0',
status integer NOT NULL default '1', status integer NOT NULL default '1',
......
...@@ -119,7 +119,8 @@ ...@@ -119,7 +119,8 @@
"2005-05-12" => "update_140", "2005-05-12" => "update_140",
"2005-05-22" => "update_141", "2005-05-22" => "update_141",
"2005-07-29" => "update_142", "2005-07-29" => "update_142",
"2005-07-30" => "update_143" "2005-07-30" => "update_143",
"2005-08-08" => "update_144"
); );
function update_32() { function update_32() {
...@@ -2533,6 +2534,22 @@ function update_143() { ...@@ -2533,6 +2534,22 @@ function update_143() {
return $ret; return $ret;
} }
function update_144() {
$ret = array();
if ($GLOBALS['db_type'] == 'mysql') {
$ret[] = update_sql("ALTER TABLE {node} CHANGE type type VARCHAR(32) NOT NULL");
}
elseif ($GLOBALS['db_type'] == 'pgsql') {
$ret[] = update_sql("ALTER TABLE {node} RENAME type TO type_old");
$ret[] = update_sql("ALTER TABLE {node} ADD type varchar(32)");
$ret[] = update_sql("ALTER TABLE {node} ALTER type SET NOT NULL");
$ret[] = update_sql("ALTER TABLE {node} ALTER type SET DEFAULT ''");
$ret[] = update_sql("UPDATE {node} SET type = type_old");
$ret[] = update_sql("ALTER TABLE {node} DROP type_old");
}
return $ret;
}
function update_sql($sql) { function update_sql($sql) {
$edit = $_POST["edit"]; $edit = $_POST["edit"];
$result = db_query($sql); $result = db_query($sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment