forked from openlp/openlp
RFC: Cleanup DB metadata for RFC
This commit is contained in:
parent
55f6197212
commit
5f2042168d
@ -53,4 +53,5 @@ def init_schema(url):
|
||||
|
||||
mapper(AlertItem, alerts_table)
|
||||
|
||||
return session, metadata
|
||||
metadata.create_all(checkfirst=True)
|
||||
return session
|
||||
|
@ -61,8 +61,7 @@ class DBManager(object):
|
||||
unicode(settings.value(u'db hostname').toString()),
|
||||
unicode(settings.value(u'db database').toString()))
|
||||
settings.endGroup()
|
||||
self.session, self.metadata = init_schema(self.db_url)
|
||||
self.metadata.create_all(checkfirst=True)
|
||||
self.session = init_schema(self.db_url)
|
||||
log.debug(u'Alerts Initialised')
|
||||
|
||||
def get_all_alerts(self):
|
||||
|
@ -147,4 +147,5 @@ def init_schema(url):
|
||||
secondary=songs_topics_table)})
|
||||
mapper(Topic, topics_table)
|
||||
|
||||
return session, metadata
|
||||
metadata.create_all(checkfirst=True)
|
||||
return session
|
||||
|
@ -110,8 +110,7 @@ class SongManager(object):
|
||||
u'db hostname', QtCore.QVariant(u'')).toString()),
|
||||
unicode(settings.value(
|
||||
u'db database', QtCore.QVariant(u'')).toString()))
|
||||
self.session, self.metadata = init_schema(self.db_url)
|
||||
self.metadata.create_all(checkfirst=True)
|
||||
self.session = init_schema(self.db_url)
|
||||
settings.endGroup()
|
||||
log.debug(u'Song Initialised')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user