Replaced sqlite with postgresql