mirror of
https://github.com/itflow-org/itflow
synced 2026-12-06 02:59:01 +00:00
Database updates: keep junk values from stopping the 26.11 update - 3.0.3 sets trip miles of a billion or more to 0 before trip_miles becomes decimal(10,1), 3.1.1 sets tax rates of 100,000% or more to 0 before tax_percent becomes decimal(9,4), and 3.5.0 leaves out a client rate of 100,000,000 or more when making Standard terms and skips clients already given them by a run that stopped part way, so an update that failed at any of these resumes cleanly when run again
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
|
||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
||||
|
||||
// Miles become decimal(10,1), which holds under a billion. A figure past
|
||||
// that was typed in by mistake (New Trip takes under 100,000 now) - it
|
||||
// goes to 0, or the change below is refused and the update stops here
|
||||
mysqli_query($mysqli, "UPDATE `trips` SET `trip_miles` = 0 WHERE ABS(`trip_miles`) >= 1000000000");
|
||||
|
||||
// Trips (functions/trips.php): the client's site it went to, the ticket it
|
||||
// was for, who logged it, miles as an exact number, and the end odometer
|
||||
// reading's misspelt column put right
|
||||
|
||||
Reference in New Issue
Block a user