diff --git a/openlp/core/lib/db.py b/openlp/core/lib/db.py index fb8a38b1f..7ad743235 100644 --- a/openlp/core/lib/db.py +++ b/openlp/core/lib/db.py @@ -73,6 +73,13 @@ def upgrade_db(url, upgrade): The python module that contains the upgrade instructions. """ session, metadata = init_db(url) + + class Metadata(BaseModel): + """ + Provides a class for the metadata table. + """ + pass + tables = upgrade.upgrade_setup(metadata) metadata_table = Table(u'metadata', metadata, Column(u'key', types.Unicode(64), primary_key=True), @@ -103,6 +110,7 @@ def upgrade_db(url, upgrade): session.commit() return int(version_meta.value), upgrade.__version__ + def delete_database(plugin_name, db_file_name=None): """ Remove a database file from the system. @@ -138,14 +146,6 @@ class BaseModel(object): instance.__setattr__(key, value) return instance - -class Metadata(BaseModel): - """ - Provides a class for the metadata table. - """ - pass - - class Manager(object): """ Provide generic object persistence management