This commit is contained in:
Tim Bentley 2011-08-27 16:04:11 +01:00
commit 3f078a553f
4 changed files with 23 additions and 6 deletions

View File

@ -170,8 +170,8 @@ class SongExportForm(OpenLPWizard):
translate('OpenLP.Ui', 'Welcome to the Song Export Wizard')) translate('OpenLP.Ui', 'Welcome to the Song Export Wizard'))
self.informationLabel.setText( self.informationLabel.setText(
translate('SongsPlugin.ExportWizardForm', 'This wizard will help to' translate('SongsPlugin.ExportWizardForm', 'This wizard will help to'
' export your songs to the open and free OpenLyrics worship song ' ' export your songs to the open and free <strong>OpenLyrics'
'format.')) '</strong> worship song format.'))
self.availableSongsPage.setTitle( self.availableSongsPage.setTitle(
translate('SongsPlugin.ExportWizardForm', 'Select Songs')) translate('SongsPlugin.ExportWizardForm', 'Select Songs'))
self.availableSongsPage.setSubTitle( self.availableSongsPage.setSubTitle(
@ -285,7 +285,9 @@ class SongExportForm(OpenLPWizard):
self, songs, unicode(self.directoryLineEdit.text())) self, songs, unicode(self.directoryLineEdit.text()))
if exporter.do_export(): if exporter.do_export():
self.progressLabel.setText( self.progressLabel.setText(
translate('SongsPlugin.SongExportForm', 'Finished export.')) translate('SongsPlugin.SongExportForm', 'Finished export. To '
'import these files use the <strong>OpenLyrics</strong> '
'importer.'))
else: else:
self.progressLabel.setText( self.progressLabel.setText(
translate('SongsPlugin.SongExportForm', translate('SongsPlugin.SongExportForm',

View File

@ -31,6 +31,7 @@ the Songs plugin
from sqlalchemy import Column, ForeignKey, Table, types from sqlalchemy import Column, ForeignKey, Table, types
from sqlalchemy.orm import mapper, relation from sqlalchemy.orm import mapper, relation
from sqlalchemy.sql.expression import func
from openlp.core.lib.db import BaseModel, init_db from openlp.core.lib.db import BaseModel, init_db
@ -195,7 +196,10 @@ def init_schema(url):
Column(u'song_number', types.Unicode(64)), Column(u'song_number', types.Unicode(64)),
Column(u'theme_name', types.Unicode(128)), Column(u'theme_name', types.Unicode(128)),
Column(u'search_title', types.Unicode(255), index=True, nullable=False), Column(u'search_title', types.Unicode(255), index=True, nullable=False),
Column(u'search_lyrics', types.UnicodeText, nullable=False) Column(u'search_lyrics', types.UnicodeText, nullable=False),
Column(u'create_date', types.DateTime(), default=func.now()),
Column(u'last_modified', types.DateTime(), default=func.now(),
onupdate=func.now())
) )
# Definition of the "topics" table # Definition of the "topics" table

View File

@ -30,10 +30,11 @@ backend for the Songs plugin
""" """
from sqlalchemy import Column, ForeignKey, Table, types from sqlalchemy import Column, ForeignKey, Table, types
from sqlalchemy.sql.expression import func
from migrate import changeset from migrate import changeset
from migrate.changeset.constraint import ForeignKeyConstraint from migrate.changeset.constraint import ForeignKeyConstraint
__version__ = 1 __version__ = 2
def upgrade_setup(metadata): def upgrade_setup(metadata):
""" """
@ -78,3 +79,13 @@ def upgrade_1(session, metadata, tables):
ForeignKeyConstraint([u'song_id'], [u'songs.id'], ForeignKeyConstraint([u'song_id'], [u'songs.id'],
table=tables[u'media_files']).create() table=tables[u'media_files']).create()
def upgrade_2(session, metadata, tables):
"""
Version 2 upgrade.
This upgrade adds a create_date and last_modified date to the songs table
"""
Column(u'create_date', types.DateTime(), default=func.now())\
.create(table=tables[u'songs'], populate_default=True)
Column(u'last_modified', types.DateTime(), default=func.now())\
.create(table=tables[u'songs'], populate_default=True)

View File

@ -11,7 +11,7 @@ Package: openlp
Architecture: all Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-qt4, Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-qt4,
python-qt4-phonon, python-sqlalchemy, python-chardet, python-beautifulsoup, python-qt4-phonon, python-sqlalchemy, python-chardet, python-beautifulsoup,
python-lxml, python-sqlite, python-enchant, python-migrate python-lxml, python-sqlite, python-enchant, python-mako, python-migrate
Conflicts: python-openlp Conflicts: python-openlp
Description: Church lyrics projection application Description: Church lyrics projection application
OpenLP is free church presentation software, or lyrics projection software, OpenLP is free church presentation software, or lyrics projection software,