Fixed sqlite & added pg