$options The stored settings row. * @return bool True when the upgrade must run. */ public static function isStale(array $options): bool { return !array_key_exists('DB_VERSION', $options) || $options['DB_VERSION'] != ABJ404_VERSION || ABJ_404_Solution_ExactInteger::readOr($options['DB_SCHEMA_REVISION'] ?? null, 0, 0) < ABJ_404_Solution_DatabaseUpgradesEtc::SCHEMA_REVISION; } /** * The settings row carrying the running code's stamp. Pure: returns a copy * and persists nothing; every other key is preserved untouched. * * @param array $options The settings row to stamp. * @return array The same row with the current stamp keys. */ public static function stamp(array $options): array { $options['DB_VERSION'] = ABJ404_VERSION; $options['DB_SCHEMA_REVISION'] = ABJ_404_Solution_DatabaseUpgradesEtc::SCHEMA_REVISION; return $options; } }