#summary Changes that require manual updates of Review Board servers
#labels Phase-Deploy,Phase-Support,Featured
= Introduction =
As Review Board is in development, there are on occasion changes that require manual intervention for an upgrade. These may be server configuration changes that need to be performed or database migrations due to database schema changes. Keep track of this list for important updates.
== Changes for 1.0 beta ==
=== r1463 - Site Configurations ===
Review Board now handles site configurations through the administration UI. Most settings can no be handled in the Settings page, and very few will still need to be edited in settings_local.py. In coming months, more options will be added to here.
After updating, users will need to run {{{./manage.py syncdb}}} to perform the migrations and add the new database schema.
=== r1461 - Django 1.0 beta 2 ===
We now require Django 1.0 beta 2. Users can still use Django SVN for the time being, though Django 1.0 will soon be released and we will then depend on that.
=== r1361 - Database migrations ===
Database migrations used to be performed by running {{{./contrib/db/backup-db.py}}} before updating the SVN checkout and then running {{{./contrib/db/load-db.py}}} afterwards. This process was slow on large installs and wasn't nearly flexible enough for more complex database modifications.
Starting in r1361, we've moved to using [http://django-evolution.googlecode.com/ Django Evolution] for our database migrations. No steps need to be performed before an SVN update. After every update, you should run:
{{{
$ ./manage.py syncdb
}}}
This will let you know if you need to perform a migration (or "evolution"). If you do, run:
{{{
$ ./manage.py evolve --execute
}}}
The migration will be performed quickly and in-place. While this should not cause any problems in your database, it is, as always, advisable that you perform a database backup (using your database's native backup tools or SQL dumping support) before performing a database migration.
=== r1247 - Media changes ===
We've moved all media files into subdirectories of htdocs/media/ (/media by default in the URL). Some server changes will need to be made to work properly with this.
* Remove the htdocs/media symlink or directory, if it exists. You'll only need to do this if you specifically created this symlink/directory and it's not the new media directory we install. The new one contains "admin," "rb" and "djblets" directories, while the old one contains "img," "css" and "js." You can ignore this until svn complains about the directory when you update.
* Remove any existing aliases pointing /media to Django's admin/media directory (or elsewhere) in the web server configuration file.
* Remove any existing aliases for /images, /css or /scripts.
* Add an alias pointing /media to the htdocs/media directory in your installation.
* Move your screenshots from htdocs/images/uploaded into htdocs/media/uploaded/images.
See below for more information.
For example, while an old configuration may look like this:
{{{
...
Alias /media /usr/lib/python2.5/site-packages/django/contrib/admin/media
Alias /images /path/to/reviewboard/htdocs/images
Alias /css /path/to/reviewboard/htdocs/css
Alias /scripts /path/to/reviewboard/htdocs/scripts
Alias /errordocs /path/to/reviewboard/htdocs/errordocs
}}}
The new configuration would look like:
{{{
...
Alias /media /path/to/reviewboard/htdocs/media
Alias /errordocs /path/to/reviewboard/htdocs/errordocs
}}}
The configuration required is highly dependent on your setup and server software. New example configuration files are provided in contrib/conf/.
You will also need to update your uploaded images directory. Previously screenshots and other uploaded images were kept in htdocs/images/uploaded/. Now you will have to place them in htdocs/media/uploaded/images/. Note that the uploaded/ and uploaded/images/ directories should be owned by the user that your web server runs as so that the server can write files to the directory.
For example:
{{{
$ cd reviewboard/htdocs
$ mv htdocs/images/uploaded htdocs/media/uploaded/images
$ chown -R apache:apache htdocs/media/uploaded
}}}
Then fix your screenshot database entries by typing:
{{{
$ ./manage.py fixscreenshots
}}}