| Description | manuals and libraries |
LedgerSMB::Upgrade_Tests - Upgrade tests for LedgerSMB
TODO
This module has a single function that returns upgrade tests.
Returns the test array
Returns the test object with the name.
Each test is a Moose object with the following properties (optional ones marked as such).
Name of the test
The first version to run this against
The maximum version to run this against
The appname of the application the test belongs to. Can currently be 'ledgersmb' or 'sql-leder'.
Text of the query to run
Repair query table to run once per result.
Hash specifying for each column (identified by the key) which query to execute to retrieve the values to fill the drop-down with.
Each query needs to return 2 columns: text and value, where value is the value to be stored in the (fixed) record and text is the textual value to be presented in the UI.
Array of queries to run on Force. Typically, they will be use to remove missing or invalid values from tables. For example, removing references to a missing business discount from the customer and vendor tables. The data is still good because the discount has been applied but we cannot find the actual values at the time.
Insert data instead of update. This to set defaults on a very limited subset of tables. Business, for example isn't required in SQL-Ledger but mandatory for LedgerSMB.
Repair columns to use as ids
Repair query columns to run once per result
columns to display on test failures
Human readable, localized display name
Human readable instructions for test, localized.
Enabled buttons
Tooltip for each button. Validate that buttons are enabled for each tooltip, then prepend defaults and override with test specific labeling.
Runs the verification query against the $dbh, calling the callback $cb with these arguments on failure: $self, $dbh, $sth.
Returns a falsish value on failure or trueish on success.
Applies data fixes. Intended to be used to resolve data-issues reported to the callback $cb of the run method.
$fix_values is an arrayref holding hashrefs with the keys being the names of the columns and the values the data to be applied for that column. Columns listed in id_columns must be part of the data supplied.
Returns an arrayref with the keys being the names of the columns and the values arrays of hashes. Each hash has two keys (text and value); the values are the allowable values for the given column in $fix_values when calling fix().
Copyright (C) 2012-2020 The LedgerSMB Core Team
This file is licensed under the GNU General Public License version 2, or at your option any later version. A copy of the license should have been included with your software.