Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#91 closed defect (fixed)

bitten upgrade broken with 0.9.x-branch opt trunk from trac

Reported by: sven.reimers@… Owned by: cmlenz
Priority: major Milestone: 0.5.1
Component: Trac plugin Version: dev
Keywords: db upgrade Cc:
Operating System:

Description

Trying to use bitten trunk leads to difficulties setting up new repository if used with sqlite or postgres.

Using 0.9.x branch -> Command failed: 'module' object has no attribute 'get_cnx_pool' with postgres (--no-backup) Using trunk -> Command failed: 'psycopg2._psycopg.connection' object has no attribute 'to_sql' (postgres)

-> Command failed: 'to_sql' (sqlite)

I got no clue what is going on, but it seems as if bitten is trying to use wrong object to call to_sql on (not the wrapper but the real connection)

Attachments (1)

db-upgrade.patch (1.1 KB) - added by sven.reimers@… 18 years ago.
Patch to fix db-upgrade problem

Download all attachments as: .zip

Change History (6)

comment:1 Changed 18 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from new to closed

This has already been fixed in [333] and [335].

comment:2 Changed 18 years ago by sven.reimers@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

I have the latest from trac trunk and bitten trunk and tried the bitten 0.5.x branch as well - still getting the upper error messages

comment:3 Changed 18 years ago by sven.reimers@…

I think i may have found what crashes:

   def environment_created(self):
        # Create the required tables
    print "Trying to create environment"
        db = self.env.get_db_cnx()
        cursor = db.cursor()
        for table in schema:
            for stmt in db.to_sql(table):
                cursor.execute(stmt)

The db.to_sql(table) seems to be broken

Changed 18 years ago by sven.reimers@…

Patch to fix db-upgrade problem

comment:4 Changed 18 years ago by sven.reimers@…

Using the attached patch, I successfully upgraded a plain vanilla empty trac environment to use the bitten plugin (both trunk versions). Thx for your patience.

comment:5 Changed 18 years ago by cmlenz

  • Operating System Windows deleted
  • Resolution set to fixed
  • Status changed from reopened to closed

Doh, thanks! Patch applied in [336] and [337].

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.