Changeset 1629 for WAeUP_SRP/trunk


Ignore:
Timestamp:
23 Mar 2007, 15:04:06 (18 years ago)
Author:
joachim
Message:

init indexes only if table is empty

Location:
WAeUP_SRP/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/PatchCatalogToolXMLAdapter.py

    r1626 r1629  
    2121        inds[ind.attributes.items()[1][1]] = ind.attributes.items()[0][1]
    2222        #print ind.attributes.items()
    23     #print "indexes: ", inds
     23    #from pdb import set_trace; set_trace()
    2424    na = node.attributes.items()
    2525    not_found = True
    2626    new_indexes = []
    2727    new_columns = []
    28     #from pdb import set_trace; set_trace()
    29     if na[0][1] == "WAeUP Table":
    30         not_found = False
    31     elif na[0][1] == "CMF Catalog":
     28    if na[0][1] in ("CMF Catalog","WAeUP Table"):
    3229        #print na[1][1]
    3330        not_found = False
     
    5047            not_found = True
    5148    if not_found:
     49        self._logger.info("%s modified." % na[1][1])
    5250        #self._initProperties(node)
    5351        #self._initObjects(node)
    54         self._initIndexes(node)
     52        if new_indexes and len(self.context()) == 0: #disable creation of new indexes if records in the table
     53            self._initIndexes(node)
    5554        self._initColumns(node)
    5655        #self._refreshCatalog()
    5756
    58     self._logger.info("Catalog tool imported.")
     57    self._logger.info("Catalog tool %s imported."  % na[1][1])
    5958   
    6059from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter
  • WAeUP_SRP/trunk/profiles/default/online_payments_import.xml

    r1625 r1629  
    11<?xml version="1.0"?>
    22<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
    3 <object name="courses_catalog" meta_type="WAeUP Table">
     3<object name="online_payments_import" meta_type="WAeUP Table">
    44 <column value="datetime"/>
    55 <column value="student_id"/>
Note: See TracChangeset for help on using the changeset viewer.