Adds support for database tablename prefixes in the upgrade SQL files.