Not sure I like the DROP stuff here, but let's exclude it from this script.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 14 Feb 2011 00:36:36 +0000 (00:36 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 14 Feb 2011 00:36:36 +0000 (00:36 +0000)
maintenance/postgres/compare_schemas.pl

index 7e3cdf7..18210fc 100644 (file)
@@ -94,7 +94,7 @@ sub parse_sql {
                next if /^\s*\-\-/ or /^\s+$/;
                s/\s*\-\- [\w ]+$//;
                chomp;
-
+       
                if (/CREATE\s*TABLE/i) {
                        if (m{^CREATE TABLE /\*_\*/(\w+) \($}) {
                                $table = $1;
@@ -179,6 +179,10 @@ while (<$newfh>) {
        next if /^CREATE TRIGGER/ or /^  FOR EACH ROW/;
        next if /^INSERT INTO/ or /^  VALUES \(/;
        next if /^ALTER TABLE/;
+       next if /^DROP SEQUENCE/;
+       next if /^DROP FUNCTION/;
+
+
        chomp;
 
        if (/^\$mw\$;?$/) {