First time here? Check out the FAQ!

Revision history  [back]

A method using git

Directory A hosts the site and contains code repository of askbot, on branch master.

To upgrade - I copy entire directory cp -pr A B (-pr to preserve file permissions), then jump into B, bring the updated code and merge it:

git fetch origin master:github-master #bring new code from github
git merge origin github-master #may need to resolve conflicts if there are customizations

Then I check if there are new database migrations:

ls askbot/migrations/

If there any any new .py files -> back up the database, create copy of the database, reflect database change in the settings.py and run

python manage.py migrate

If there are no migrations - test run the site. It is also possible to run the test suite - all should succeed except PageLoadTests (there is a missing piece of test data)

Once everything works - swap the directories.

The git method has advantage that it makes it easy to maintain your customizations while being able to upgrade, but one has to learn basic git manipulations.

Method using pip or easy_install

First install askbot into virtual environment. Then make a copy of that environment and the project directory.

In the copy of your virtual environment run

pip upgrade askbot
python manage.py migrate --list

If there are new database migrations, clone the database as well and reflect the change in the settings.py

Run the migrations

python manage.py migrate# there may be other apps to migrate besides askbot

See whether everything works, then either swap the project directories and the python environment or change the server configuration to serve from the new directory.

A method using git

Directory A hosts the site and contains code repository of askbot, on branch master.

To upgrade - I copy entire directory cp -pr A B (-pr to preserve file permissions), then jump into B, bring the updated code and merge it:

git fetch origin master:github-master #bring new code from github
git merge origin github-master #may need to resolve conflicts if there are customizations

Then I check if there are new database migrations:

ls askbot/migrations/

If there any any new .py files -> back up the database, create copy of the database, reflect database change in the settings.py and run

python manage.py migrate

If there are no migrations - test run the site. It is also possible to run the test suite - all should succeed except PageLoadTests (there is a missing piece of test data)

Once everything works - swap the directories.

The git method has advantage that it makes it easy to maintain your customizations while being able to upgrade, but one has to learn basic git manipulations.

Method using pip or easy_install

First install askbot into virtual environment. Then make a copy of that environment and the project directory.

In the copy of your virtual environment run

pip upgrade askbot
python manage.py migrate --list

If there are new database migrations, clone the database as well and reflect the change in the settings.py

Run the migrations

python manage.py migrate# there may be other apps to migrate besides askbot

See whether everything works, then either swap the project directories and the python environment or change the server configuration to serve from the new directory.

A method using git

Directory A hosts the site and contains code repository of askbot, on branch master.

To upgrade - I copy entire directory cp -pr A B (-pr to preserve file permissions), then jump into B, bring the updated code and merge it:

git fetch origin master:github-master #bring new code from github
git merge origin github-master #may need to resolve conflicts if there are customizations

Then I check if there are new database migrations:

ls askbot/migrations/

If there any any new .py files -> back up the database, create copy of the database, reflect database change in the settings.py and run

python manage.py migrate

If there are no migrations - test run the site. It is also possible to run the test suite - all should succeed except PageLoadTests (there is a missing piece of test data)

Once everything works - swap the directories.

Method using pip or easy_install

First install askbot into virtual environment. Then make a copy of that environment and the project directory.

In the copy of your virtual environment run

pip upgrade askbot
python manage.py migrate --list

If there are new database migrations, clone the database as well and reflect the change in the settings.py

Run the migrations

python manage.py migrate# there may be other apps to migrate besides askbot

See whether everything works, then either swap the project directories and the python environment or change the server configuration to serve from the new directory.