changing sqlite to post gress