server/migractions.py
branchstable
changeset 3548 4cf5a360952e
parent 3213 36a2357ccbc4
child 3577 067610a0e12f
equal deleted inserted replaced
3547:0c18a6c8d9b7 3548:4cf5a360952e
   624         rql = 'SET X %s VAL WHERE X is %s, X %s VAL' % (newname, etype, oldname)
   624         rql = 'SET X %s VAL WHERE X is %s, X %s VAL' % (newname, etype, oldname)
   625         card = eschema.rproperty(newname, 'cardinality')[0]
   625         card = eschema.rproperty(newname, 'cardinality')[0]
   626         if card == '1':
   626         if card == '1':
   627             rql += ', NOT X %s NULL' % oldname
   627             rql += ', NOT X %s NULL' % oldname
   628         self.rqlexec(rql, ask_confirm=self.verbosity>=2)
   628         self.rqlexec(rql, ask_confirm=self.verbosity>=2)
       
   629         # XXX if both attributes fulltext indexed, should skip fti rebuild
       
   630         # XXX if old attribute was fti indexed but not the new one old value
       
   631         # won't be removed from the index (this occurs on other kind of
       
   632         # fulltextindexed change...)
   629         self.cmd_drop_attribute(etype, oldname, commit=commit)
   633         self.cmd_drop_attribute(etype, oldname, commit=commit)
   630 
   634 
   631     def cmd_add_entity_type(self, etype, auto=True, commit=True):
   635     def cmd_add_entity_type(self, etype, auto=True, commit=True):
   632         """register a new entity type
   636         """register a new entity type
   633 
   637