Don't use error handling to determine if tables exist.

Review Request #11236 — Created Oct. 20, 2020 and submitted — Latest diff uploaded

Information

Django Evolution
master

Reviewers

When Evolver sets itself up, it looks for the presence of a Version
table, falling back on bootstrapping if it doesn't exist. This was done
by attempting a direct query and then initiating bootstrap if no
Version items were present or if the table itself didn't exist in the
database.

Handling this by watching for an error isn't ideal, and can impact any
parent transaction, or obscure other issues. Instead, the better
approach is to look to see if the table exists in the database directly.

This change implements that, and takes care of a similar type of check
in one of the Evolver unit tests.

Unit tests pass for all databases.

Commits

Files