$oldToolBox = R::getToolBox();
$oldAdapter = $oldToolBox->getDatabaseAdapter();
$customWriter = new CustomPKWriterMySQL( $oldAdapter );
$newRedBean = new OODB( $customWriter );
$newToolBox = new ToolBox( $newRedBean, $oldAdapter, $customWriter );
R::configureFacadeWithToolbox( $newToolBox );