swaps sqlite out for pg