Part of stoqlib.database.migration View In Hierarchy
Known subclasses: stoqlib.database.migration.PluginSchemaMigration, stoqlib.database.migration.StoqlibSchemaMigration
Schema migration management
Is currently doing the following things:
| 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 | 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 | get_current_version | This method is revision for returning the database schema version |
| Method | generate_sql_for_patch | This method is responsible for creating an SQL |
| Method | after_update | This can be implemented in a subclass, but it is not mandatory. |
| Returns | True or False. | |
This must be implemented in a subclass
| Returns | the current database patch version | |
This must be implemented in a subclass
| Parameters | patch | the patch that was applied |
| Returns | an SQL string | |