def METHOD_NAME():
    """
    scenario of creating upgrading extensions with possible schema and
    version specifications
    """
    with patch.dict(
        postgres_extension.__salt__,
        {
            "postgres.create_metadata": Mock(
                side_effect=[
                    [postgresmod._EXTENSION_NOT_INSTALLED],
                    [postgresmod._EXTENSION_TO_MOVE, postgresmod._EXTENSION_INSTALLED],
                ]
            ),
            "postgres.create_extension": Mock(side_effect=[False, False]),
        },
    ):
        ret = postgres_extension.present("foo")
        assert ret == {
            "comment": "Failed to install extension foo",
            "changes": {},
            "name": "foo",
            "result": False,
        }
        ret = postgres_extension.present("foo")
        assert ret == {
            "comment": "Failed to upgrade extension foo",
            "changes": {},
            "name": "foo",
            "result": False,
        }