Skip to main content.
Index | Support | Documentation | FAQ

Adding Details to a table.

If you have a need for additing additional details to a table you may be able to get the system to do it for you.

For example, if you wanted add a site name to a table - how?

When vet -p wdb has finished running it checks params.txt for MySQL_Dump = xxxx, if there, it executes xxxx.

This allows users to have the system make changes to the tables, sync MySQL servers, call replication, compress files etc.

It can be used to add additional details as per:

  • Create the script in /u/source/scripts
  • Make sure it has a .sh suffix - (the install script will set access permissions).
  • Add the name to MySQL_DUMP e.g.
    MySQL_Dump = /u/source/scripts/test1.sh
    

    The Test1 scripts could be:

    # Called after DM has rebuilt. This version will add a column name to the 
    # noshow table with sitename in it.
    
    # Database name will be passed as $1
    [ -n "$1" ] || exit
    
    Site=`uuname -l`   # What site did it come from?
    
    mysql $1 << EOF
    alter table noshow add sitename varchar(10);
    update noshow set sitename = "${Site}";
    EOF