Changed from sqlite to postgresql