2.08 Sundry Actions - andperry256/my-base-theme-and-dbadmin GitHub Wiki

Sundry Actions

This page provides a brief description of the built-in actions other than the standard table actions. Some of these relate to functions that are described in detail elsewhere. They are all accessed via links at the bottom of the main DB Admin application page.

Update Table Data

This action is responsible for initialising/updating the built-in tables from the current MySQL database. Reference is made to this functionality in other pages. Any new table information is added to dba_table_info and dba_table_fields as required. Also any necessary constraints relating to the MySQL table structure are imposed within dba_table_fields.

At the start of the operation, the orphan flag is set in all records in dba_table_info and dba_table_fields and then cleared for each table/field as it is processed, thus leaving it set on all unused (orphan) records. MySQL views are made available to list and delete these records.

Renumber Records

Record renumbering has been covered in detail under Sequence Numbering. This action performs a renumbering operation on all tables for which this function is enabled.

Export Tables

This action is used to export the contents of a given table to a CSV file. This enables the data to be stored in a more readable/usable format than is created by performing a MySQL dump to SQL. $TableExportDir must be set up as a global variable indicating the path of the directory where the CSV dump is to be created. The filename of the CSV dump is of the form table_<table name>.csv.

A dropdown list allows the selection of any table in the database. In addition there is an option to perform a multiple dump, which will cause the dumping of all tables for which the auto_dump flag is set in dba_table_info.

Sync Databases

This action is very much dependent on the configuration of my own local servers, and so it may be appropriate to remove the link to it in some deployments.

This action is used to synchronise the database between the local server and the online server and is only valid when run from the local server. It provides the option to synchronise in either direction with the default option defined according to information from the sites configuration database. There are also options to backup and restore the local database without full synchronisation.