# now get a handle to the database:
my $dbh = Bugzilla->dbh;
+# We want to catch if the user is trying to "upgrade" from 5.1 because
+# that's actually a downgrade and you can't do that.
+my $bz51install = $dbh->bz_index_info('bz_schema', 'bz_schema_version_idx');
+if ($bz51install) {
+ require Bugzilla::Error;
+ import Bugzilla::Error;
+ ThrowCodeError("bz51_attempted_upgrade");
+}
+
# Create the tables, and do any database-specific schema changes.
$dbh->bz_setup_database();
Bugzilla does not support the search type
"[% operator.truncate(30, "...") FILTER html %]".
+ [% ELSIF error == "bz51_attempted_upgrade" %]
+ [% title = "Invalid Upgrade Path" %]
+ It looks like you are attempting to "upgrade" from
+ Bugzilla 5.1. This is not supported because 5.2 is
+ based on Bugzilla 5.0.6 and not 5.1, so this is
+ actually a downgrade.
+
[% ELSE %]
[%# Try to find hooked error messages %]
[% error_message = Hook.process("errors") %]