Replace SQLite for Postgresql