When I make a database in Ruby, based on the Heroku instruction, I have to command like this:
heroku run rake db:migrate
So when I did this, my entries that are stored in my local pc weren't transferred to Heroku. So, after searching for the way how I can do this, I saw this method.
- Dumping the database file.
- Setting heroku
- heroku pg:push mylocaldb HEROKU_POSTGRESQL_MAGENTA --app sushi sushi = my app name in Heroku.
When I tried to do this, the below error occured: TOC entry error, owerner of extension plpqsql error.
...
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2257; 0 0 COMMENT EXTENSION plpgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of extension plpgsql
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
..
WARNING: errors ignored on restore: 1
I make the database file by
pg_dump databasenamehere > databasedumpfile
And I found the "databasenamehere" in /config/database.yml,,, development name.
This keeps happening and I don't know what to do.. :(
How can I solve this issue?
Is there any good method to put the entries to the HEROKU?
Also, why rake:db:migrate didn't push the entries to heroku? ( thinking this is a rookie question )