Switch to postgresql from sqlite