sort lists/peers, rename peers
This commit is contained in:
parent
eac91e7a3a
commit
8ddf228068
9 changed files with 141 additions and 26 deletions
|
|
@ -84,6 +84,20 @@ class PostUpdate(Command):
|
|||
if old <= '20140521-65-e14c686' and new > '20140521-65-e14c686':
|
||||
if not os.path.exists(settings.db_path):
|
||||
r('./ctl', 'setup')
|
||||
if old <= '20140525-92-eac91e7' and new > '20140525-92-eac91e7':
|
||||
import user.models
|
||||
for u in user.models.User.query:
|
||||
u.update_name()
|
||||
u.save()
|
||||
import item.models
|
||||
for f in item.models.File.query:
|
||||
changed = False
|
||||
for key in ('mediastate', 'coverRatio', 'previewRatio'):
|
||||
if key in f.info:
|
||||
del f.info[key]
|
||||
changed = True
|
||||
if changed:
|
||||
f.save()
|
||||
|
||||
class Setup(Command):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue