schema upgrade to remove commas from tags

This commit is contained in:
Charles Haley 2010-12-15 14:41:36 +00:00
parent 1617ffb510
commit fb73e74ff7

View File

@ -425,3 +425,7 @@ class SchemaUpgrade(object):
ids = [(x[0],) for x in data if has_cover(x[1])] ids = [(x[0],) for x in data if has_cover(x[1])]
self.conn.executemany('UPDATE books SET has_cover=1 WHERE id=?', ids) self.conn.executemany('UPDATE books SET has_cover=1 WHERE id=?', ids)
def upgrade_version_15(self):
'Remove commas from tags'
self.conn.execute('UPDATE tags SET name=REPLACE(name, \',\', \';\')')