Replace SQLite with PostgreSQL