43700cb838992fddef848cff7f1a37197b035ee0,mlflow/store/sqlalchemy_store.py,SqlAlchemyStore,_verify_schema,#Any#,101
Before Change
mc = MigrationContext.configure(connection)
diff = compare_metadata(mc, Base.metadata)
if len(diff) > 0:
_logger.error("Detected one or more differences between current database schema "
"and desired schema, exiting. Diff:\n %s",
pprint.pformat(diff, indent=2, width=20))
raise MlflowException(
"Detected out-of-date database schema. Take a backup of your database, then "
"run "mlflow db upgrade %s" to migrate your database to the latest schema. "
"NOTE: schema migration may result in database downtime "
After Change
@staticmethod
def _verify_schema(engine):
head_revision = SqlAlchemyStore._get_latest_schema_revision()
current_rev = _get_schema_version(engine)
if current_rev != head_revision:
raise MlflowException(
"Detected out-of-date database schema (found version %s, but expected %s). "
"Take a backup of your database, then run "mlflow db upgrade %s" to migrate "
"your database to the latest schema. NOTE: schema migration may result in "
"database downtime - please consult your database"s documentation for more "
"detail." % (current_rev, head_revision, str(engine.url)))
@staticmethod
def _get_managed_session_maker(SessionMaker):
Creates a factory for producing exception-safe SQLAlchemy sessions that are made available
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: mlflow/mlflow
Commit Name: 43700cb838992fddef848cff7f1a37197b035ee0
Time: 2019-05-22
Author: smurching@gmail.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: _verify_schema
Project Name: streamlit/streamlit
Commit Name: ddea47a633bf2cf97c69951467fdb1cc586485f1
Time: 2018-10-12
Author: adrien.g.treuille@gmail.com
File Name: lib/streamlit/Connection.py
Class Name: Connection
Method Name: _cleanup_on_exit
Project Name: duecredit/duecredit
Commit Name: d1d5cf4c664aecae5d9d2aff5c6d4eda96317e3f
Time: 2019-03-01
Author: debian@onerussian.com
File Name: duecredit/io.py
Class Name:
Method Name: format_bibtex