r15792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r15791‎ | r15792 | r15793 >
Date:02:05, 23 July 2006
Author:greg
Status:old
Tags:
Comment:
Allow multiple tables on one line in DATA section.
Add in new "user" and "text" mapping
Modified paths:
  • /trunk/phase3/maintenance/postgres/compare_schemas.pl (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/postgres/compare_schemas.pl
@@ -72,6 +72,7 @@
7373 my ($infunction,$inview,$inrule) = (0,0,0);
7474 while (<$newfh>) {
7575 next if /^\s*\-\-/ or /^\s*$/;
 76+ s/\s*\-\- [\w ']+$//;
7677 next if /^BEGIN;/ or /^SET / or /^COMMIT;/;
7778 next if /^CREATE SEQUENCE/;
7879 next if /^CREATE(?: UNIQUE)? INDEX/;
@@ -79,7 +80,6 @@
8081 next if /^CREATE TRIGGER/ or /^ FOR EACH ROW/;
8182 next if /^INSERT INTO/ or /^ VALUES \(/;
8283 next if /^ALTER TABLE/;
83 - s/\s*\-\- [\w ]+$//;
8484 chomp;
8585
8686 if (/^\$mw\$;?$/) {
@@ -118,9 +118,11 @@
119119 ## Read in known exceptions
120120 my %ok;
121121 while (<DATA>) {
122 - next unless /^(\w+)\s*:\s*(\S+)/;
 122+ next unless /^(\w+)\s*:\s*([^#]+)/;
123123 my ($name,$val) = ($1,$2);
124 - $ok{$name}{$val}=1;
 124+ for (split(/\s+/ => $val)) {
 125+ $ok{$name}{$_}=1;
 126+ }
125127 }
126128
127129 ## Old but not new
@@ -157,5 +159,7 @@
158160 ## Known exceptions
159161 OLD: searchindex ## We use tsearch2 directly on the page table instead
160162 OLD: archive ## This is a view due to the char(14) timestamp hack
 163+OLD: user text ## Reserved words, so we use something else
 164+NEW: mwuser pagecontent ## This is what we use
161165 NEW: archive2 ## The real archive table
162166 NEW: mediawiki_version ## Just us, for now