Package buildbot :: Package db :: Package schema :: Module manager :: Class DBSchemaManager
[frames] | no frames]

Class DBSchemaManager

source code

object --+
         |
        DBSchemaManager

This class is responsible for managing the database schema and upgrading it as necessary. This includes both the *actual* database and the old pickle database, as migrations move data between the two.

Note that this class is *entirely synchronous*! Performing any other operations while changing the schema is just asking for trouble.

Instance Methods
 
__init__(self, spec, basedir)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_db_version(self, conn=None)
Get the current schema version for this database
source code
 
get_current_version(self)
Get the current db version for this release of buildbot
source code
 
is_current(self)
Is this database current?
source code
 
upgrade(self, quiet=False)
Upgrade this database to the current version
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, spec, basedir)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)