Replace SQLite by PostgreSQL