public static void renameTablesWithPrefix ( SQLiteDatabase db , final String prefix ) { Logger . info ( "MASSIVE TABLE RENAME OPERATION: ADD PREFIX " + prefix ) ; query ( db , null , QueryType . TABLE , new OnResultListener ( ) { @ Override public void onRow ( SQLiteDatabase db , String name , String sql ) { sql = String . format ( "ALTER TABLE %s RENAME TO %s%s;" , name , prefix , name ) ; Logger . info ( sql ) ; db . execSQL ( sql ) ; } } ) ; }
Add to all table a specifix prefix .