porting DB classes from older version