connection
Override the standard connection() method to include the DB/SW-version check.
We pass the 4th argument to the version-check, this is the options-hash passed to the connect() method of the DBIx::Class::Schema subclass.
_on_connect();
This (private) method, checks if we can connect to the database by checking that the (schema) version stored in the database is the same as this software is.
The version-check is skipped if the `ignore_version` attribute is true.
It is an implementation detail/choice how and where to store the (schema) version of the database and that of the software (the DBIx::Class generated ORM).
This example uses the Config table with a single value stored in db_version. This version is also set whenever the deploy() method on the Schema is called.