Replaced Sqlite3 with POSTGRESQL