server/migractions.py
changeset 5928 d9936c39d478
parent 5897 0c6f2f866202
child 5999 eaf8219f8b7d
equal deleted inserted replaced
5927:654a34e4eb2e 5928:d9936c39d478
  1244         entity = self._cw.create_entity(etype, **kwargs)
  1244         entity = self._cw.create_entity(etype, **kwargs)
  1245         if commit:
  1245         if commit:
  1246             self.commit()
  1246             self.commit()
  1247         return entity
  1247         return entity
  1248 
  1248 
       
  1249     def cmd_update_etype_fti_weight(self, etype, weight):
       
  1250         if self.repo.system_source.dbdriver == 'postgres':
       
  1251             self.sqlexec('UPDATE appears SET weight=%(weight)s '
       
  1252                          'FROM entities as X '
       
  1253                          'WHERE X.eid=appears.uid AND X.type=%(type)s',
       
  1254                          {'type': etype, 'weight': weight}, ask_confirm=False)
       
  1255 
  1249     def cmd_reindex_entities(self, etypes=None):
  1256     def cmd_reindex_entities(self, etypes=None):
  1250         """force reindexaction of entities of the given types or of all
  1257         """force reindexaction of entities of the given types or of all
  1251         indexable entity types
  1258         indexable entity types
  1252         """
  1259         """
  1253         from cubicweb.server.checkintegrity import reindex_entities
  1260         from cubicweb.server.checkintegrity import reindex_entities