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_INSTALLED],
                    [postgresmod._EXTENSION_TO_MOVE, postgresmod._EXTENSION_INSTALLED],
                ]
            ),
            "postgres.create_extension": Mock(side_effect=[True, True, True]),
        },
    ):
        ret = postgres_extension.present("foo")
        assert ret == {
            "comment": "The extension foo has been installed",
            "changes": {"foo": "Installed"},
            "name": "foo",
            "result": True,
        }
        ret = postgres_extension.present("foo")
        assert ret == {
            "comment": "Extension foo is already present",
            "changes": {},
            "name": "foo",
            "result": True,
        }
        ret = postgres_extension.present("foo")
        assert ret == {
            "comment": "The extension foo has been upgraded",
            "changes": {"foo": "Upgraded"},
            "name": "foo",
            "result": True,
        }