Revert "Revert "sqlite to postgre""

This reverts commit c92032d1149216bf4ed3c78930e94bfc0f1bd352.