12
8

I have an older version of OSQA running on my site. How do I upgrade it (presumably through subversion)? What is the recommended stable release?

Thanks for your help!

asked 05 Nov '10, 02:06

JW's gravatar image

JW
3365912
accept rate: 33%

closed 12 May '11, 05:09

Benny's gravatar image

Benny
84972426


The trunk of subversion is generally what this site runs (and our hosted sites). It generally stays pretty stable. You can run svn update on your previous checkout, then run the migrations with South (hopefully you set that up in the beginning). The DB migration should go smoothly, but post here if you have any problems.

So to summarize:

  1. svn update
  2. python manage.py migrate forum

Note - I just did an upgrade, and at first glance it seemed that svn update is sufficient. Then, a few hours later, the site broke down. It seems a daily job must have run and "corrupted" the state. Fortunately, python manage.py migrate forum was able to solve the issue.

link

answered 08 Nov '10, 07:42

matt's gravatar image

matt ♦♦
6.1k335645
accept rate: 48%

edited 20 Mar '11, 03:26

ripper234's gravatar image

ripper234 ♦
3.2k60116123

What is the procedure for applying the database migrations?

(08 Nov '10, 20:12) Kevin Yank

@Kevin, it's pretty basic (discussed here)

python manage.py migrate forum
(08 Nov '10, 20:20) rickross ♦♦
1

The trunk of subversion is generally what this site runs

Actually, meta.osqa.net is currently running SVN-886 whereas the trunk is at SVN-1029.

(08 May '11, 05:35) dharmatech

I would suggest this:

svn switch http://svn.osqa.net/svnroot/osqa/tags/fantasy-island-0.9.0-beta3/

Why?

  1. It preserves local code changes which you may have done.
  2. It uses stable version tag, not trunk that may be unstable.

Of course don't forget the database migration and Apache restart:

python manage.py migrate forum
/etc/init.d/apache restart
link

answered 26 Mar '11, 07:05

Tambet%20Matiisen's gravatar image

Tambet Matiisen
236134
accept rate: 0%

1

Excellent answer!

(26 Mar '11, 08:02) matt ♦♦

I just tried an update to beta3 (rev 956) from rev 777; when I try to migrate, I get a ream of errors: ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined. Error: Can't find the file 'forms.py' in the directory containing 'manage.py'. It appears you've customized things. You'll have to run django-admin.py, passing it your settings module. (If the file forms.py does indeed exist, it's causing an ImportError somehow.)

Same happens when I try as the osqa or www-data users, and as root.

Am I missing some env settings on the command line?

(09 Apr '11, 22:49) askvictor
1

OK; fixed that - I had to specify to the shell the settings that live in osqa.wsgi. Namely PYTHONPATH=/path/to/osqa:/path/to/osqa/osqa-server and DJANGO_SETTINGS_MODULE=osqa-server.settings

What is the accepted way to set these up? .bashrc?

(09 Apr '11, 22:58) askvictor
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×23
×15
×4

Asked: 05 Nov '10, 02:06

Seen: 1,281 times

Last updated: 29 Jun '11, 02:03

powered by OSQA