[p4dti-discussion] Problem upgrading database schema from P4DTI2.3.5 -> 2.4.0

n.herring at atlantiscyberspace.com n.herring at atlantiscyberspace.com
Tue Jul 31 02:26:05 BST 2007


Update:

 

I still couldn't get this to work, but I found out that my
old_schema_version was 4.

 

So I just executed the commands here from the schema_upgrade array:

 

'4': ('5', ['alter table p4dti_replications'

                    'add completed int not null default 0',

                    'update p4dti_replications set completed=1'

                    'where end >= start']),

 

Executed these in phpmyadmin and then changed my schema_version in the
p4dti_config table to 5.

 

Things seems to be working. I get updates from out test P4 server and
comments seem to work out.

 

One unknown is that all the rows in the table 'p4dti_replications'
column 'completed' should be set to '1'? Currently I have the first 10
at 0 and the rest (around 40) are '1'. Just wanted to make sure it is ok
to change those to '1'.

 

I know this isn't what an end user is supposed to do, but please let me
know if this was a completely wrong thing to do.

 

Thanks!

-Nick

 

From: p4dti-discussion-bounces at ravenbrook.com
[mailto:p4dti-discussion-bounces at ravenbrook.com] On Behalf Of
n.herring at atlantiscyberspace.com
Sent: Monday, July 30, 2007 1:56 PM
To: p4dti-discussion at ravenbrook.com
Subject: [p4dti-discussion] Problem upgrading database schema from
P4DTI2.3.5 -> 2.4.0

 

First off, I don't know if this is the correct forum to discuss
technical issues. If so, please redirect me.

 

Otherwise:

 

Anyone having this problem?

 

goose p4dti # python run.py

2007-07-30 23:45:19 UTC  (P4DTI-10070)  MySQLdb version '1.2.1_p2'
(release '1.2.1_p2') detected.  This release is supported by the P4DTI.

2007-07-30 23:45:19 UTC  (P4DTI-1251)  Bugzilla version 3.0 detected.

Traceback (most recent call last):

  File "run.py", line 20, in ?

    from init import r

  File "/p4dti/init.py", line 135, in ?

    config = configure_module.configuration(config)

  File "/p4dti/configure_bugzilla.py", line 578, in configuration

    config.bugzilla = bugzilla.bugzilla(db, config)

  File "/p4dti/bugzilla.py", line 57, in __init__

    self.update_p4dti_schema()

  File "/p4dti/bugzilla.py", line 1034, in update_p4dti_schema

    (new_version, sql_commands) = schema_upgrade[old_schema_version]

NameError: global name 'schema_upgrade' is not defined

 

I am trying to upgrade an existing version of P4DTI (2.3.5 -> 2.4.0). I
upgraded to BZ 3.0 first.

 

Not a Python guy, but it seems the variable (schema_upgrade) is defined.

 

Any help would be appreciated,

-Nick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ravenbrook.com/pipermail/p4dti-discussion/attachments/20070730/8bf04a06/attachment.html 


More information about the P4DTI-discussion mailing list