*Add ar_len, remove reference to archive2 for Postgres
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 13 Mar 2007 23:02:43 +0000 (23:02 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 13 Mar 2007 23:02:43 +0000 (23:02 +0000)
maintenance/archives/patch-ar_len.sql [new file with mode: 0644]
maintenance/mysql5/tables-binary.sql
maintenance/mysql5/tables.sql
maintenance/postgres/tables.sql
maintenance/updaters.inc

diff --git a/maintenance/archives/patch-ar_len.sql b/maintenance/archives/patch-ar_len.sql
new file mode 100644 (file)
index 0000000..69e634b
--- /dev/null
@@ -0,0 +1,3 @@
+ALTER TABLE /*$wgDBprefix*/archive
+  ADD ar_len INT(8) UNSIGNED;
+
index 2b82a4f..688771d 100644 (file)
@@ -394,7 +394,9 @@ CREATE TABLE /*$wgDBprefix*/archive (
   
   -- rev_deleted for archives
   ar_deleted tinyint(1) unsigned NOT NULL default '0',
-  
+  -- Length of this revision in bytes
+  ar_len int(8) unsigned,
+    
   KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp)
 
 ) ENGINE=InnoDB, DEFAULT CHARSET=binary;
index 4aff4bc..834901e 100644 (file)
@@ -385,7 +385,9 @@ CREATE TABLE /*$wgDBprefix*/archive (
   
   -- rev_deleted for archives
   ar_deleted tinyint(1) unsigned NOT NULL default '0',
-  
+  -- Length of this revision in bytes
+  rev_len int(8) unsigned,
+    
   KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp)
 
 ) ENGINE=InnoDB, DEFAULT CHARSET=utf8;
index ac0cc36..e06969c 100644 (file)
@@ -136,8 +136,9 @@ CREATE TABLE archive (
   ar_rev_id      INTEGER,
   ar_text_id     INTEGER,
   ar_deleted     INTEGER         NOT NULL DEFAULT '0',
+  ar_len         INTEGER          NULL,
 );
-CREATE INDEX archive_name_title_timestamp ON archive2 (ar_namespace,ar_title,ar_timestamp);
+CREATE INDEX archive_name_title_timestamp ON archive (ar_namespace,ar_title,ar_timestamp);
 
 CREATE TABLE redirect (
   rd_from       INTEGER  NOT NULL  REFERENCES page(page_id) ON DELETE CASCADE,
index 2fe3653..fe64fb9 100644 (file)
@@ -74,6 +74,7 @@ $wgNewFields = array(
        array( 'filearchive',   'fa_deleted',           'patch-fa_deleted.sql' ),
        array( 'page_restrictions', 'pr_id',            'patch-page_restrictions_sortkey.sql' ),
        array( 'revision',      'rev_len',              'patch-rev_len.sql' ),
+       array( 'archive',       'ar_len',               'patch-ar_len.sql' ),
        array( 'revision',      'rev_parent_id',        'patch-rev_parent_id.sql' ),
 );