@ Override public boolean isSafeToRunUpdate ( ) throws DatabaseException { DatabaseConnection connection = getConnection ( ) ; if ( connection == null ) { return true ; } String url = connection . getURL ( ) ; if ( url == null ) { return false ; } return ( url . contains ( "localhost" ) ) || ( url . contains ( "127.0.0.1" ) ) ; }
Default implementation just look for local IPs . If the database returns a null URL we return false since we don t know it s safe to run the update .