From 1e4b922bface5007549f69faeb26892299f3f6e7 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 26 Aug 2011 20:09:25 +0100 Subject: [PATCH] DB Fixed --- openlp/core/lib/db.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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