Search code examples
postgresqlheroku

Remote database is not empty. Please create a new database or use heroku pg:reset


I've been searching for an hours and no luck at all. I'm trying to push my local postgresql to heroku but this error occured. So this is my actual windows command:

heroku pg:push mydb postgresql-cubed-16465

After I enter it: Remote database is not empty. Please create a new database or use heroku pg:reset

Of course I just follow the instruction heroku pg:reset and is done. So I try to push it again, same result. Can anybody help me with this?


Solution

  • I follow the instruction in here and just remove ' in the url in this part heroku pg:backups:restore 'https://s3.amazonaws.com/me/items/3H0q/mydb.dump' DATABASE_URL

    https://devcenter.heroku.com/articles/heroku-postgres-import-export