Chapter 8. Administration and upkeep

Table of Contents

Administration - Database
Upgrade DB structure
Merge duplicate customers

Administration - Database

This set of functions allow you to control the database structure and to perform some routines to verify and fix some problems that might occur with the data stored in the database. There are two screens used to handle the database; Database that has functions to update and verify the structure of the database and Information where the functionality is focused on checking the data stored in that structure.

Upgrade DB structure

There are two functions for this, preview upgrade and upgrade. Preview will simply show you what will be done if the database structure is updated and upgrade will actually change the structure. You can use preview to get a general idea of how much will be changed. There will of course only be changes if the software has been updated. Changes can include adding columns, removing columns or adding tables. Tables will not be deleted.

There are a couple of files in different directories, all called tables.struct. These describe the table structure to use. What these two functions do is to compare the described structure for all tables that are described in the text file with the actual tables in the database. If there are differences it will issue SQL statements that update the database to be the same.

Merge duplicate customers

This function takes care of merging customers that are marked as such. You'll have to choose what role is used to mark duplicates, usually Main account - duplicate account. Select that and get the resulting list. If there are marked duplicates you can now click on the main account and get a list showing the main account followed by all duplicate accounts. If you spot any errors in the duplicate account list, you can click the company name to edit the company and remove or change the role that links it to the main account.

If the list of duplicates is correct, click on the merge customer button to actually move the information from the duplicate accounts to the main account. Everything will be moved as is, there's another duplicate check done on address and phone/fax/email numbers on the company but it will have to be exactly the same to be merged automatically on the main account. Once all the records linking to the customer has been moved to the main account the duplicate account will be removed.