Previous Topic: Test to Production Migration

Next Topic: Web Interface Customization


Change or Delete Site-Defined Columns after Publishing

After site-defined schema modifications are published, WSP treats them similarly to standard schema and restricts further changes. You can delete a site-defined column or change the length of a site-defined string column by manually updating the DBMS and schema external to WSP. Then you run the pdm_wspupd script to update the database wspcol table to synchronize WSP with the external changes.

follow these steps:

Note: In this procedure, you can use any standard text editor to edit the wsp_schema.sch file.

  1. Find the site/mods (UNIX) or site\mods (Windows) subdirectory in your CA SDM installation directory.
  2. Edit the wsp_schema.sch file to delete unwanted site-defined columns or change the length of site-defined STRING columns. These updates are the only changes supported by this procedure.

    Important! If any of the index options (such as, UNIQUE) were specified for deleting a column, edit the wsp_index.sch file and remove references to the column. If the column was the only indexed column in the table, remove all references to the table from wsp_index.sch.

  3. Edit file majic/wsp.mods (UNIX) or majic\wsp.mods (Windows) with the same changes made to wsp_schema.sch:
  4. Open a command window and issue the command:
    pdm_wspupd
    

    The pdm_wspupd script reads wsp_schema.sch and compares it with the wspcol table in the database, writing a line to the console for any differences. The output is similar to the following:

    PDM_WSPUPD - Update wspcol table from wsp_schema.sch
    Reading wsp_schema.sch to for current DBMS information...
    Reading wspcol table for WSP schema information...
    String column zSalesOrg.description length changed from 350 to 400
    Column zSalesOrg.sym not found in wsp_schema.sch - deleting wspcol row
    pdm_wspupd found 1 WSP-maintained column(s) to update and 1 to delete. Please verify that your DBMS has been manually updated to correspond to wsp_schema.sch, then reply Y to update wspcol or anything else to cancel.
    
  5. Verify that the changes found by pdm_wspupd correspond exactly to the changes you made to wsp_schema.sch. If they match, type Y to confirm the changes.

    After you confirm the update, the script uses standard CA SDM utilities to update the wspcol table. Then, Schema Designer shows your changes.

  6. Stop CA SDM services.
  7. Using the appropriate utility for your DBMS, alter the DBMS definition of the columns you changed:

    Take care that the changes you make to the DBMS correspond exactly to the changes you made to wsp_schema.sch.

  8. Delete the wsp_schema.log file.
  9. Run pdm_publish.
  10. Start CA SDM services.