Re: upgrade from 1.6beta1 to 1.6beta2 failed with error applying evolution.

2011-05-09 Thread Christian Hammond
I'll be putting out a hotfix within the hour that I hope fixes this for you.

Christian


On Monday, May 9, 2011, meadowman keir.robin...@gmail.com wrote:
 Hi, I tried upgrading to the beta2 build just now, without success.

 # rb-site --debug upgrade /var/www/reviews
 Rebuilding directory structure
 Updating database. This may take a while.
 /usr/local/lib/python2.7/site-packages/django/db/__init__.py:60:
 DeprecationWarning: Short names for ENGINE in database configurations
 are deprecated. Prepend default.ENGINE with 'django.db.backends.'
   DeprecationWarning
 Creating tables ...
 There are unapplied evolutions for reviews.
 Project signature has changed - an evolution is required
 Installing custom SQL ...
 Installing indexes ...
 No fixtures found.
 /usr/local/lib/python2.7/site-packages/Crypto/Util/randpool.py:40:
 RandomPool_DeprecationWarning: This application uses RandomPool, which
 is BROKEN in older releases.  See http://www.pycrypto.org/randpool-broken
   RandomPool_DeprecationWarning)
 /usr/local/lib/python2.7/site-packages/django_evolution/db/common.py:
 126: DeprecationWarning: inner has been called without providing a
 connection argument.
   params = (qn(model._meta.db_table), qn(f.column), f.db_type(),
 unique_constraints)
 Error: Error applying evolution: cannot ALTER TABLE reviews_comment
 because it has pending trigger events

 I've had a scout round for this error, the workarounds I've found
 discussed changing the SQL being applied for the migration (the
 backend is postgres 8.4).

 The debian sqeeze box this is on has the following extra python
 libraries installed:

 Django==1.3
 Djblets==0.6.7
 PIL==1.1.7
 Pygments==1.4
 ReviewBoard==1.6beta2
 SQLAlchemy==0.6.7
 distribute==0.6.16
 django-evolution==0.6.2
 flup==1.0.3.dev-20110405
 paramiko==1.7.6
 psycopg2==2.4
 pycrypto==2.3
 pyodbc==2.1.8
 python-dateutil==1.5
 python-memcached==1.47
 pytz==2011g
 recaptcha-client==1.0.6

 If I'm making a newbie mistake, can someone point me in the right
 direction?

 Thanks.

 --
 Want to help the Review Board project? Donate today at 
 http://www.reviewboard.org/donate/
 Happy user? Let us know at http://www.reviewboard.org/users/
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to 
 reviewboard+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/reviewboard?hl=en

-- 
-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: upgrade from 1.6beta1 to 1.6beta2 failed with error applying evolution.

2011-05-09 Thread Christian Hammond
Or not.

This is an annoying complication involving PostgreSQL's way of handling
certain types of alterations within a single transaction, and there's no
clear way of making this work without 1) major changes to django-evolution,
the project that handles database migrations, or 2) changing the database
schema in 1.6 beta 2, which will break anyone else who already upgraded to
it or has been developing on it.

So, no immediate solution. Stay tuned?

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Mon, May 9, 2011 at 11:51 AM, Christian Hammond chip...@chipx86.comwrote:

 I'll be putting out a hotfix within the hour that I hope fixes this for
 you.

 Christian


 On Monday, May 9, 2011, meadowman keir.robin...@gmail.com wrote:
  Hi, I tried upgrading to the beta2 build just now, without success.
 
  # rb-site --debug upgrade /var/www/reviews
  Rebuilding directory structure
  Updating database. This may take a while.
  /usr/local/lib/python2.7/site-packages/django/db/__init__.py:60:
  DeprecationWarning: Short names for ENGINE in database configurations
  are deprecated. Prepend default.ENGINE with 'django.db.backends.'
DeprecationWarning
  Creating tables ...
  There are unapplied evolutions for reviews.
  Project signature has changed - an evolution is required
  Installing custom SQL ...
  Installing indexes ...
  No fixtures found.
  /usr/local/lib/python2.7/site-packages/Crypto/Util/randpool.py:40:
  RandomPool_DeprecationWarning: This application uses RandomPool, which
  is BROKEN in older releases.  See
 http://www.pycrypto.org/randpool-broken
RandomPool_DeprecationWarning)
  /usr/local/lib/python2.7/site-packages/django_evolution/db/common.py:
  126: DeprecationWarning: inner has been called without providing a
  connection argument.
params = (qn(model._meta.db_table), qn(f.column), f.db_type(),
  unique_constraints)
  Error: Error applying evolution: cannot ALTER TABLE reviews_comment
  because it has pending trigger events
 
  I've had a scout round for this error, the workarounds I've found
  discussed changing the SQL being applied for the migration (the
  backend is postgres 8.4).
 
  The debian sqeeze box this is on has the following extra python
  libraries installed:
 
  Django==1.3
  Djblets==0.6.7
  PIL==1.1.7
  Pygments==1.4
  ReviewBoard==1.6beta2
  SQLAlchemy==0.6.7
  distribute==0.6.16
  django-evolution==0.6.2
  flup==1.0.3.dev-20110405
  paramiko==1.7.6
  psycopg2==2.4
  pycrypto==2.3
  pyodbc==2.1.8
  python-dateutil==1.5
  python-memcached==1.47
  pytz==2011g
  recaptcha-client==1.0.6
 
  If I'm making a newbie mistake, can someone point me in the right
  direction?
 
  Thanks.
 
  --
  Want to help the Review Board project? Donate today at
 http://www.reviewboard.org/donate/
  Happy user? Let us know at http://www.reviewboard.org/users/
  -~--~~~~--~~--~--~---
  To unsubscribe from this group, send email to
 reviewboard+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/reviewboard?hl=en

 --
 --
 Christian Hammond - chip...@chipx86.com
 Review Board - http://www.reviewboard.org
 VMware, Inc. - http://www.vmware.com


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: upgrade from 1.6beta1 to 1.6beta2 failed with error applying evolution.

2011-05-09 Thread meadowman
Thank you for taking a look at the problem.  It is very helpful to know that 
it is not just a mistake on my part.

Is it likely that a beta1 - beta3 upgrade will work? That is to say, might 
the beta3 schema be such that the postgres issue is circumvented? 

Alternatively, might I be able to use an SQLite3 database as a bridge; 
something like a django-admin dump to json from the postgres install
create a new beta1 site using sqlite3 and use django-admin to load the json 
to it.

Then I could upgrade to beta2 - and evolve the sqlite3 site; create a new 
postgres install (using beta2) and load json into it from the upgraded 
sqlite3 site.

Regards.

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: upgrade from 1.6beta1 to 1.6beta2 failed with error applying evolution.

2011-05-09 Thread Christian Hammond
A beta 1 to 3 upgrade should be fine. I won't release until it is.

Just to provide some detail on the problem. We use Django-Evolution
for database migrations. In beta 2, we added a new non-NULL boolean
field to a table, which Django-Evolution adds through an ALTER TABLE
followed by an UPDATE. Postgres has a problem doing this in one
transaction, and the result is the error you're seeing.

I'm trying to find a way to make this work without regressing
elsewhere. I do have a tentative fix to Django-Evolution, so if I can
be reasonably sure it's safe, I'll perform a couple new releases.

Christian


On Monday, May 9, 2011, meadowman keir.robin...@gmail.com wrote:
 Thank you for taking a look at the problem.  It is very helpful to know that 
 it is not just a mistake on my part.
 Is it likely that a beta1 - beta3 upgrade will work? That is to say, might 
 the beta3 schema be such that the postgres issue is circumvented?
 Alternatively, might I be able to use an SQLite3 database as a bridge; 
 something like a django-admin dump to json from the postgres installcreate a 
 new beta1 site using sqlite3 and use django-admin to load the json to it.
 Then I could upgrade to beta2 - and evolve the sqlite3 site; create a new 
 postgres install (using beta2) and load json into it from the upgraded 
 sqlite3 site.
 Regards.




 --
 Want to help the Review Board project? Donate today at 
 http://www.reviewboard.org/donate/
 Happy user? Let us know at http://www.reviewboard.org/users/
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to 
 reviewboard+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/reviewboard?hl=en

-- 
-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en