You require a rollback of your data to a previous point in a hobby, mini, and basic tier Heroku Postgres database.
Unfortunately, Rollback is not available on hobby, mini, and basic tier databases
Rollback requires a standard tier or better database and these are the databases recommended for use in production applications. For more information on our database tiers, please see our documentation on database plans
Regardless of tier, you might be able to move your database back to a previous backup if you have one captured. For more information please review https://devcenter.heroku.com/articles/heroku-postgres-backups