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]),
        },
    ):
        with patch.dict(postgres_extension.__opts__, {"test": True}):
            ret = postgres_extension.present("foo")
            assert ret == {
                "comment": "Extension foo is set to be installed",
                "changes": {},
                "name": "foo",
                "result": None,
            }
            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": "Extension foo is set to be upgraded",
                "changes": {},
                "name": "foo",
                "result": None,
            }