updated sqlite to postgresql