Index: branches/5.2.x/core/install/install_schema.sql
===================================================================
diff -u -N -r14853 -r14856
--- branches/5.2.x/core/install/install_schema.sql	(.../install_schema.sql)	(revision 14853)
+++ branches/5.2.x/core/install/install_schema.sql	(.../install_schema.sql)	(revision 14856)
@@ -1,6 +1,6 @@
 CREATE TABLE PermissionConfig (
   PermissionConfigId int(11) NOT NULL auto_increment,
-  PermissionName varchar(30) NOT NULL default '',
+  PermissionName varchar(255) NOT NULL default '',
   Description varchar(255) NOT NULL default '',
   ModuleId varchar(20) NOT NULL default '0',
   IsSystem tinyint(1) NOT NULL DEFAULT '0',
@@ -474,6 +474,7 @@
   OverridePageCacheKey tinyint(4) NOT NULL DEFAULT '0',
   PageCacheKey varchar(255) NOT NULL DEFAULT '',
   PageExpiration int(11) DEFAULT NULL,
+  LiveRevisionNumber int(11) NOT NULL DEFAULT '1',
   DirectLinkEnabled tinyint(4) NOT NULL DEFAULT '1',
   DirectLinkAuthKey varchar(20) NOT NULL,
   PRIMARY KEY (CategoryId),
@@ -503,7 +504,8 @@
   KEY EnablePageCache (EnablePageCache),
   KEY OverridePageCacheKey (OverridePageCacheKey),
   KEY PageExpiration (PageExpiration),
-  KEY Protected (Protected)
+  KEY Protected (Protected),
+  KEY LiveRevisionNumber (LiveRevisionNumber)
 );
 
 CREATE TABLE CategoryCustomData (
@@ -1025,15 +1027,34 @@
   PageContentId int(11) NOT NULL AUTO_INCREMENT,
   ContentNum int(11) NOT NULL DEFAULT '0',
   PageId int(11) NOT NULL DEFAULT '0',
+  RevisionId int(11) NOT NULL,
   l1_Content text,
   l2_Content text,
   l3_Content text,
   l4_Content text,
   l5_Content text,
   PRIMARY KEY (PageContentId),
-  KEY ContentNum (ContentNum,PageId)
+  KEY ContentNum (ContentNum,PageId),
+  KEY RevisionId (RevisionId)
 );
 
+CREATE TABLE PageRevisions (
+  RevisionId int(11) NOT NULL AUTO_INCREMENT,
+  PageId int(11) NOT NULL,
+  RevisionNumber int(11) NOT NULL,
+  IsDraft tinyint(4) NOT NULL,
+  FromRevisionId int(11) NOT NULL,
+  CreatedById int(11) DEFAULT NULL,
+  CreatedOn int(11) DEFAULT NULL,
+  AutoSavedOn int(11) DEFAULT NULL,
+  `Status` tinyint(4) NOT NULL DEFAULT '2',
+  PRIMARY KEY (RevisionId),
+  KEY PageId (PageId),
+  KEY RevisionNumber (RevisionNumber),
+  KEY IsDraft (IsDraft),
+  KEY `Status` (`Status`)
+);
+
 CREATE TABLE FormFields (
   FormFieldId int(11) NOT NULL AUTO_INCREMENT,
   FormId int(11) NOT NULL DEFAULT '0',
