7 Replies Latest reply on Oct 12, 2012 8:42 AM by 965843

    Rename FK and PK, that exceed 30 characters name limit


      I am trying to write a custom script (Rhino) to change all the FK and PK names, that are more than 30 characters long.
      I have to do that, because I get the DDL script from Infosphere Data Architect, whitch ignores this Oracle restriction.

      I wrote this script, but it does not what I want. Insted of changing the name it changes the PK / UK Index names. Can anybody please help me.

      tables = model.getTableSet().toArray();
      for (var t = 0; t<tables.length;t++){
      table = tables[t];
      indexes = table.getKeys();
      for (var i = 0; i < indexes.length; i++) {
      index = indexes;
      if((index.isFK() || index.isPK()) && index.GetName().length > 30){