equal
deleted
inserted
replaced
317 return # watched changes to final relation type are unexpected |
317 return # watched changes to final relation type are unexpected |
318 cnx = self.cnx |
318 cnx = self.cnx |
319 if 'fulltext_container' in self.values: |
319 if 'fulltext_container' in self.values: |
320 op = UpdateFTIndexOp.get_instance(cnx) |
320 op = UpdateFTIndexOp.get_instance(cnx) |
321 for subjtype, objtype in rschema.rdefs: |
321 for subjtype, objtype in rschema.rdefs: |
322 op.add_data(subjtype) |
322 if self.values['fulltext_container'] == 'subject': |
323 op.add_data(objtype) |
323 op.add_data(subjtype) |
|
324 op.add_data(objtype) |
|
325 else: |
|
326 op.add_data(objtype) |
|
327 op.add_data(subjtype) |
324 # update the in-memory schema first |
328 # update the in-memory schema first |
325 self.oldvalues = dict( (attr, getattr(rschema, attr)) for attr in self.values) |
329 self.oldvalues = dict( (attr, getattr(rschema, attr)) for attr in self.values) |
326 self.rschema.__dict__.update(self.values) |
330 self.rschema.__dict__.update(self.values) |
327 # then make necessary changes to the system source database |
331 # then make necessary changes to the system source database |
328 if not 'inlined' in self.values: |
332 if not 'inlined' in self.values: |
1311 """operation to update full text indexation of entity whose schema change |
1315 """operation to update full text indexation of entity whose schema change |
1312 |
1316 |
1313 We wait after the commit to as the schema in memory is only updated after |
1317 We wait after the commit to as the schema in memory is only updated after |
1314 the commit. |
1318 the commit. |
1315 """ |
1319 """ |
|
1320 containercls = list |
1316 |
1321 |
1317 def postcommit_event(self): |
1322 def postcommit_event(self): |
1318 cnx = self.cnx |
1323 cnx = self.cnx |
1319 source = cnx.repo.system_source |
1324 source = cnx.repo.system_source |
1320 schema = cnx.repo.vreg.schema |
1325 schema = cnx.repo.vreg.schema |