beingsane / streeme

Automatically exported from code.google.com/p/streeme
MIT License
0 stars 0 forks source link

Error 500 after update #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I updated from an unknown version

After the update, the mobile site worked, the desktop site gave an error 500

In error.log I found this:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'streeme.song_genres' 
doesn't exist.

I fixed it with
./symfony doctrine:build --all --and-load 

Original issue reported on code.google.com by federico...@gmail.com on 28 Jan 2012 at 11:24

GoogleCodeExporter commented 8 years ago
While it's not a bug, it will be documented. The problem was caused by the 
schema changing in the Database. I try to avoid changing the database schema 
between minor versions. 0.4.x should remain compatible with patches, but 
upgrading to 0.5.x will usually require a database update.

The command you used is a perfectly valid way to rebuild the DB, but it will 
completely restore your database to the new version and delete your data. If 
you're upgrading from unknown versions you can also try to  migrate, which is 
pretty simple and will preserve your old data where possible. You'll likely 
have to rescan your music once it's done. 

./symfony cc 
./symfony doctrine:generate-migrations-diff
./symfony doctrine:migrate
./symfony doctrine:build --all-classes
./symfony cc

I've added the info to the update streeme Wiki found here 
http://code.google.com/p/streeme/wiki/UpdateStreeme#Migrating_your_database_sche
ma_between_minor_versions

http://code.google.com/p/streeme/wiki/UpdateStreeme

Original comment by chaffn...@gmail.com on 29 Jan 2012 at 11:13