Commit 50cd866c authored by Gerhard Killesreiter's avatar Gerhard Killesreiter

#46630, by Gordon and Cvbge

parent eda4d906
......@@ -482,7 +482,8 @@ CREATE TABLE node_revisions (
log longtext NOT NULL default '',
timestamp int(11) NOT NULL default '0',
format int(4) NOT NULL default '0',
PRIMARY KEY (nid,vid),
PRIMARY KEY (vid),
KEY nid (nid),
KEY uid (uid)
) TYPE=MyISAM
/*!40100 DEFAULT CHARACTER SET utf8 */ ;
......
......@@ -458,8 +458,9 @@ CREATE TABLE node_revisions (
log text NOT NULL default '',
timestamp integer NOT NULL default '0',
format int NOT NULL default '0',
PRIMARY KEY (nid,vid)
PRIMARY KEY (vid)
);
CREATE INDEX node_revisions_nid_idx ON node_revisions(nid);
CREATE INDEX node_revisions_uid_idx ON node_revisions(uid);
CREATE SEQUENCE node_revisions_vid_seq INCREMENT 1 START 1;
......
......@@ -755,10 +755,11 @@ function system_update_146() {
log text NOT NULL default '',
timestamp integer NOT NULL default '0',
format int NOT NULL default '0',
PRIMARY KEY (nid,vid))");
PRIMARY KEY (vid))");
$ret[] = update_sql("INSERT INTO {node_revisions} (nid, vid, uid, title, body, teaser, timestamp, format)
SELECT nid, nid AS vid, uid, title, body, teaser, changed AS timestamp, format
FROM {node}");
$ret[] = update_sql('CREATE INDEX {node_revisions}_nid_idx ON {node_revisions}(nid)');
$ret[] = update_sql('CREATE INDEX {node_revisions}_uid_idx ON {node_revisions}(uid)');
$vid = db_next_id('{node}_nid');
$ret[] = update_sql("CREATE SEQUENCE {node_revisions}_vid_seq INCREMENT 1 START $vid");
......
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