server/migractions.py
changeset 5928 d9936c39d478
parent 5897 0c6f2f866202
child 5999 eaf8219f8b7d
--- a/server/migractions.py	Wed Jul 07 14:18:28 2010 +0200
+++ b/server/migractions.py	Wed Jul 07 14:21:52 2010 +0200
@@ -1246,6 +1246,13 @@
             self.commit()
         return entity
 
+    def cmd_update_etype_fti_weight(self, etype, weight):
+        if self.repo.system_source.dbdriver == 'postgres':
+            self.sqlexec('UPDATE appears SET weight=%(weight)s '
+                         'FROM entities as X '
+                         'WHERE X.eid=appears.uid AND X.type=%(type)s',
+                         {'type': etype, 'weight': weight}, ask_confirm=False)
+
     def cmd_reindex_entities(self, etypes=None):
         """force reindexaction of entities of the given types or of all
         indexable entity types