[cpif] r296 - trunk/backend
svn at argo.es
svn at argo.es
Fri Jul 27 14:45:08 CEST 2007
Author: jcea
Date: Fri Jul 27 14:45:05 2007
New Revision: 296
Log:
Primeros pasos en la monitorizacion de hilos/metatags
Modified:
trunk/backend/database.py
trunk/backend/upgrade.py
Modified: trunk/backend/database.py
==============================================================================
--- trunk/backend/database.py (original)
+++ trunk/backend/database.py Fri Jul 27 14:45:05 2007
@@ -1,7 +1,7 @@
# $Id$
-VERSION_DB="2007072601"
+VERSION_DB="2007072701"
import globales
@@ -303,6 +303,8 @@
"OpenID":PersistentSet(OpenIDs),
"email":email,
"cookie":None,
+ "monitor metatags":BTree(),
+ "monitor hilos":BTree(),
"nick":nick})
if do_backup_users :
@@ -341,6 +343,7 @@
"num_hilos":0,
"TS2hilo":BTree(),
"moderadores":moderadores,
+ "monitor":BTree(),
})
for usuario in root["usuarios"]["usuarios"].itervalues() :
@@ -398,6 +401,7 @@
"TS creacion":ts,
"titulo":titulo,
"metatags":PersistentSet([metatag]),
+ "monitor":BTree(),
"num_mensajes":0,
"mensajes":BTree(),
"numeros":BTree()})
Modified: trunk/backend/upgrade.py
==============================================================================
--- trunk/backend/upgrade.py (original)
+++ trunk/backend/upgrade.py Fri Jul 27 14:45:05 2007
@@ -254,3 +254,15 @@
root["static"]["js"]=BTree()
conn.commit()
+ if root["version del foro"]=="2007072601" :
+ print "Actualizando la base de datos: 2007072601 -> 2007072701"
+ root["version del foro"]="2007072701"
+ for usuario in root["usuarios"]["usuarios"].itervalues() :
+ usuario["monitor metatags"]=BTree()
+ usuario["monitor hilos"]=BTree()
+ for metatag in root["metatags"]["metatags"].itervalues() :
+ metatag["monitor"]=BTree()
+ for hilo in root["hilos"]["hilos"].itervalues() :
+ hilo["monitor"]=BTree()
+ conn.commit()
+
More information about the cpif
mailing list