forked from openlp/openlp
Update pjlink_class define in db
This commit is contained in:
parent
17ff6a7d31
commit
372051067d
@ -152,7 +152,7 @@ class Projector(Base, CommonMixin):
|
|||||||
location: Column(String(30))
|
location: Column(String(30))
|
||||||
notes: Column(String(200))
|
notes: Column(String(200))
|
||||||
pjlink_name: Column(String(128)) # From projector
|
pjlink_name: Column(String(128)) # From projector
|
||||||
pjlink_class Column(String(1)) # From projector
|
pjlink_class Column(String(5)) # From projector
|
||||||
manufacturer: Column(String(128)) # From projector
|
manufacturer: Column(String(128)) # From projector
|
||||||
model: Column(String(128)) # From projector
|
model: Column(String(128)) # From projector
|
||||||
other: Column(String(128)) # From projector
|
other: Column(String(128)) # From projector
|
||||||
@ -199,7 +199,7 @@ class Projector(Base, CommonMixin):
|
|||||||
location = Column(String(30))
|
location = Column(String(30))
|
||||||
notes = Column(String(200))
|
notes = Column(String(200))
|
||||||
pjlink_name = Column(String(128))
|
pjlink_name = Column(String(128))
|
||||||
pjlink_class = Column(String(1))
|
pjlink_class = Column(String(5))
|
||||||
manufacturer = Column(String(128))
|
manufacturer = Column(String(128))
|
||||||
model = Column(String(128))
|
model = Column(String(128))
|
||||||
other = Column(String(128))
|
other = Column(String(128))
|
||||||
|
@ -89,5 +89,5 @@ def upgrade_3(session, metadata):
|
|||||||
upgrade_db = 'pjlink_class' not in [col.name for col in projector_table.c.values()]
|
upgrade_db = 'pjlink_class' not in [col.name for col in projector_table.c.values()]
|
||||||
if upgrade_db:
|
if upgrade_db:
|
||||||
new_op = get_upgrade_op(session)
|
new_op = get_upgrade_op(session)
|
||||||
new_op.add_column('projector', Column('pjlink_class', types.String(1), server_default=null()))
|
new_op.add_column('projector', Column('pjlink_class', types.String(5), server_default=null()))
|
||||||
log.debug('{status} projector DB upgrade to version 3'.format(status='Updated' if upgrade_db else 'Skipping'))
|
log.debug('{status} projector DB upgrade to version 3'.format(status='Updated' if upgrade_db else 'Skipping'))
|
||||||
|
Loading…
Reference in New Issue
Block a user