From 7f6a1dbb11a6e9dc3a50b826b17d84ff505341a5 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Sun, 23 Jul 2006 02:05:21 +0000 Subject: [PATCH] Allow multiple tables on one line in DATA section. Add in new "user" and "text" mapping --- maintenance/postgres/compare_schemas.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/maintenance/postgres/compare_schemas.pl b/maintenance/postgres/compare_schemas.pl index 6e130f9a8a..56670af1c6 100644 --- a/maintenance/postgres/compare_schemas.pl +++ b/maintenance/postgres/compare_schemas.pl @@ -72,6 +72,7 @@ my %new; my ($infunction,$inview,$inrule) = (0,0,0); while (<$newfh>) { next if /^\s*\-\-/ or /^\s*$/; + s/\s*\-\- [\w ']+$//; next if /^BEGIN;/ or /^SET / or /^COMMIT;/; next if /^CREATE SEQUENCE/; next if /^CREATE(?: UNIQUE)? INDEX/; @@ -79,7 +80,6 @@ while (<$newfh>) { next if /^CREATE TRIGGER/ or /^ FOR EACH ROW/; next if /^INSERT INTO/ or /^ VALUES \(/; next if /^ALTER TABLE/; - s/\s*\-\- [\w ]+$//; chomp; if (/^\$mw\$;?$/) { @@ -118,9 +118,11 @@ close $newfh; ## Read in known exceptions my %ok; while () { - next unless /^(\w+)\s*:\s*(\S+)/; + next unless /^(\w+)\s*:\s*([^#]+)/; my ($name,$val) = ($1,$2); - $ok{$name}{$val}=1; + for (split(/\s+/ => $val)) { + $ok{$name}{$_}=1; + } } ## Old but not new @@ -157,5 +159,7 @@ __DATA__ ## Known exceptions OLD: searchindex ## We use tsearch2 directly on the page table instead OLD: archive ## This is a view due to the char(14) timestamp hack +OLD: user text ## Reserved words, so we use something else +NEW: mwuser pagecontent ## This is what we use NEW: archive2 ## The real archive table NEW: mediawiki_version ## Just us, for now -- 2.20.1