adds full sqlite support, but has borked postgres