Add update-UserTable.sh

This commit is contained in:
zhuyj17 2016-08-21 17:18:56 +08:00
parent 7d883432ac
commit cfa40f96f6
2 changed files with 14 additions and 2 deletions

View File

@ -101,8 +101,7 @@ class User(db.Model):
self.auth_method = auth_method
def __repr__(self):
#return '<User %r>' % (self.username)
return '<User %r beans %r>' % (self.username,self.beans)
return '<User %r>' % (self.username)
#token will expire after 3600s
def generate_auth_token(self, expiration = 3600):

13
tools/update-UserTable.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
echo "Backup UserTable..."
cp /opt/docklet/global/sys/UserTable.db /opt/docklet/global/sys/UserTable.db.backup
sed -i "75s/^ /#/g" ../src/model.py
sed -i "95s/^ /#/g" ../src/model.py
echo "Alter UserTable..."
python3 alterUserTable.py
git checkout -- ../