Is this a jury trial? In some cases that I worked back in my legal days, it was common for the prosecutor to dig up all the "dirt" on any character witnesses so as to impugn your credibility and character.
Since you do have a drug related past and this is a drug related charge, it is possible that the defense attorney will excuse you for lack of credibility.