Changed to postgres from SQlite