Support databases other than mysql

Just tested with postgres