Class s.d.m.StoqlibSchemaMigration(SchemaMigration):

Part of stoqlib.database.migration View In Hierarchy

This is a SchemaMigration subclass used by Stoqlib. It's responsible for migrating the data for stoqlib itself and all its plugins
Method check_uptodate Verify if the schema is up to date.
Method update Updates the database schema
Method update_plugins Undocumented
Method check_plugins Undocumented
Method get_current_version This method is revision for returning the database schema version
Method after_update This can be implemented in a subclass, but it is not mandatory.
Method generate_sql_for_patch This method is responsible for creating an SQL

Inherited from SchemaMigration:

Method __init__ Undocumented
Method _patchname_is_valid Undocumented
Method _get_patches Undocumented
Method _update_schema Check the current version of database and update the schema if
Method apply_all_patches Apply all available patches
def check_uptodate(self):
Verify if the schema is up to date.
ReturnsTrue or False.
def update(self, plugins=True, backup=True):
Updates the database schema
def update_plugins(self):
Undocumented
def check_plugins(self):
Undocumented
def get_current_version(self):
This method is revision for returning the database schema version for a migration subclass

This must be implemented in a subclass

Returnsthe current database patch version
def after_update(self):
This can be implemented in a subclass, but it is not mandatory. It'll be called after applying all patches
def generate_sql_for_patch(self, patch):
This method is responsible for creating an SQL statement which is used to update the migration versioning information

This must be implemented in a subclass

Parameterspatchthe patch that was applied
Returnsan SQL string
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.