title: ActiveRecord::PendingMigrationError after restore of local database from Heroku
body: <p>I have an app on Heroku (which is up to date and has run the latest migrations), when I download the database to my local postgresql database with this script:</p>
  
  <pre><code>heroku pgbackups:capture --expire --app myapp
  echo "Captured database on heroku"
  curl -o latest.dump `heroku pgbackups:url --app myapp`
  echo "Downloaded database"
  pg_restore --verbose --clean --no-acl --no-owner -h localhost -d cooking latest.dump
  echo "Database restored"
  </code></pre>
  
  <p>And I start my local server I get an error like this:</p>
  
  <p>ActiveRecord::PendingMigrationError
  Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.</p>
  
  <p>I have tried deleting and resetting my old database with no change.</p>