summaryrefslogtreecommitdiff
path: root/maintenance/postgres/compare_schemas.pl
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/postgres/compare_schemas.pl')
-rw-r--r--maintenance/postgres/compare_schemas.pl63
1 files changed, 13 insertions, 50 deletions
diff --git a/maintenance/postgres/compare_schemas.pl b/maintenance/postgres/compare_schemas.pl
index 9bddf504..7e3cdf71 100644
--- a/maintenance/postgres/compare_schemas.pl
+++ b/maintenance/postgres/compare_schemas.pl
@@ -43,7 +43,7 @@ tinytext mediumtext text char varchar varbinary binary
timestamp datetime
tinyblob mediumblob blob
);
-$datatype .= q{|ENUM\([\"\w, ]+\)};
+$datatype .= q{|ENUM\([\"\w\', ]+\)};
$datatype = qr{($datatype)};
my $typeval = qr{(\(\d+\))?};
@@ -142,50 +142,6 @@ sub parse_sql {
} ## end of parse_sql
-## Read in the parser test information
-my $parsefile = '../parserTests.inc';
-open my $pfh, '<', $parsefile or die qq{Could not open "$parsefile": $!\n};
-my $stat = 0;
-my %ptable;
-while (<$pfh>) {
- if (!$stat) {
- if (/function listTables/) {
- $stat = 1;
- }
- next;
- }
- $ptable{$1}=2 while m{'(\w+)'}g;
- last if /\);/;
-}
-close $pfh or die qq{Could not close "$parsefile": $!\n};
-
-my $OK_NOT_IN_PTABLE = '
-change_tag
-filearchive
-logging
-profiling
-querycache_info
-searchindex
-tag_summary
-trackbacks
-transcache
-user_newtalk
-updatelog
-valid_tag
-';
-
-## Make sure all tables in main tables.sql are accounted for in the parsertest.
-for my $table (sort keys %{$old{'../tables.sql'}}) {
- $ptable{$table}++;
- next if $ptable{$table} > 2;
- next if $OK_NOT_IN_PTABLE =~ /\b$table\b/;
- print qq{Table "$table" is in the schema, but not used inside of parserTest.inc\n};
-}
-## Any that are used in ptables but no longer exist in the schema?
-for my $table (sort grep { $ptable{$_} == 2 } keys %ptable) {
- print qq{Table "$table" ($ptable{$table}) used in parserTest.inc, but not found in schema\n};
-}
-
for my $oldfile (@old) {
## Begin non-standard indent
@@ -316,18 +272,20 @@ rc_log_type varbinary(255) TEXT
## Simple text-only strings:
ar_flags tinyblob TEXT
+cl_collation varbinary(32) TEXT
+cl_sortkey varbinary(230) TEXT
ct_params blob TEXT
-fa_minor_mime varbinary(32) TEXT
+fa_minor_mime varbinary(100) TEXT
fa_storage_group varbinary(16) TEXT # Just 'deleted' for now, should stay plain text
fa_storage_key varbinary(64) TEXT # sha1 plus text extension
ipb_address tinyblob TEXT # IP address or username
ipb_range_end tinyblob TEXT # hexadecimal
ipb_range_start tinyblob TEXT # hexadecimal
-img_minor_mime varbinary(32) TEXT
+img_minor_mime varbinary(100) TEXT
lc_lang varbinary(32) TEXT
lc_value varbinary(32) TEXT
-
img_sha1 varbinary(32) TEXT
+iw_wikiid varchar(64) TEXT
job_cmd varbinary(60) TEXT # Should we limit to 60 as well?
keyname varbinary(255) TEXT # No tablename prefix (objectcache)
ll_lang varbinary(20) TEXT # Language code
@@ -335,7 +293,10 @@ lc_value mediumblob TEXT
log_params blob TEXT # LF separated list of args
log_type varbinary(10) TEXT
ls_field varbinary(32) TEXT
-oi_minor_mime varbinary(32) TEXT
+md_deps mediumblob TEXT # JSON
+mr_blob mediumblob TEXT # JSON
+mr_lang varbinary(32) TEXT
+oi_minor_mime varbinary(100) TEXT
oi_sha1 varbinary(32) TEXT
old_flags tinyblob TEXT
old_text mediumblob TEXT
@@ -354,6 +315,7 @@ rc_params blob TEXT
rlc_to_blob blob TEXT
ts_tags blob TEXT
ug_group varbinary(16) TEXT
+ul_value blob TEXT
up_property varbinary(32) TEXT
up_value blob TEXT
user_email_token binary(32) TEXT
@@ -362,10 +324,12 @@ user_newpassword tinyblob TEXT
user_options blob TEXT
user_password tinyblob TEXT
user_token binary(32) TEXT
+iwl_prefix varbinary(20) TEXT
## Text URLs:
el_index blob TEXT
el_to blob TEXT
+iw_api blob TEXT
iw_url blob TEXT
tb_url blob TEXT
tc_url varbinary(255) TEXT
@@ -574,5 +538,4 @@ __DATA__
OLD: searchindex ## We use tsearch2 directly on the page table instead
RENAME: user mwuser ## Reserved word causing lots of problems
RENAME: text pagecontent ## Reserved word
-NEW: mediawiki_version ## Just us, for now
XFILE: ../archives/patch-profiling.sql