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

Part of stoqlib.database.migration View In Hierarchy

This is a SchemaMigration class which is suitable for use within a plugin
Method __init__ Create a new PluginSchemaMigration object.
Method generate_sql_for_patch This method is responsible for creating an SQL
Method get_current_version This method is revision for returning the database schema version

Inherited from SchemaMigration:

Method _patchname_is_valid Undocumented
Method _get_patches Undocumented
Method _update_schema Check the current version of database and update the schema if
Method check_uptodate Verify if the schema is up to date.
Method apply_all_patches Apply all available patches
Method update Updates the database schema
Method after_update This can be implemented in a subclass, but it is not mandatory.
def __init__(self, plugin_name, resource, patterns):
Create a new PluginSchemaMigration object.
Parametersplugin_namename of the plugin
resourceresource to load sql patches from
patternssql patch pattern
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
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
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.