Changeset 5624


Ignore:
Timestamp:
May 6, 2011, 2:33:22 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1591: Upgrade script for BASE 2.17 --> 3.0

References #1598: Use the extensions system for data file validators and metadata readers

Update that removes the four columns from the DataFileTypes table and remove all references to the properties from the context settings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Update.java

    r5621 r5624  
    271271      cleanContextFromProperty(session, Item.PLUGINTYPE, "jarPath", "jarFile");
    272272 
     273      // Four properties removed from DataFileType
     274      cleanContextFromProperty(session, Item.DATAFILETYPE, "validatorClass", null);
     275      cleanContextFromProperty(session, Item.DATAFILETYPE, "validatorJarPath", null);
     276      cleanContextFromProperty(session, Item.DATAFILETYPE, "metadataReaderClass", null);
     277      cleanContextFromProperty(session, Item.DATAFILETYPE, "metadataReaderJarPath", null);
    273278     
    274279      // 2: remove unused columns/tables
     
    278283      dropColumn(session, "JobAgentSettings", "jar_path", progress);
    279284      dropColumn(session, "ArrayDesigns", "affy_chip", progress);
     285      dropColumn(session, "DataFileTypes", "validator_class", progress);
     286      dropColumn(session, "DataFileTypes", "validator_jarpath", progress);
     287      dropColumn(session, "DataFileTypes", "extractor_class", progress);
     288      dropColumn(session, "DataFileTypes", "extractor_jarpath", progress);
    280289     
    281290      setSchemaVersionInTransaction(session, 100);
     
    389398        Map<String, PropertyFilterData> filters = ctx.getPropertyFilters();
    390399        PropertyFilterData propertyFilter = filters.remove(propertyName);
    391         if (propertyFilter != null) filters.put(replacementPropertyName, propertyFilter);
     400        if (propertyFilter != null && replacementPropertyName != null)
     401        {
     402          // Replace with new property
     403          filters.put(replacementPropertyName, propertyFilter);
     404        }
    392405       
    393406      }
Note: See TracChangeset for help on using the changeset viewer.