changing from squlite3 to postgresql