in-app LogViewer: new action Send to developers added (click on file icon click in server files list).
Feature works only for registered IP addresses, so before use it customer must notify unitybase.info
maintainer about server public IP
LogViewer at https://unitybase.info/logview/ can now open log files from the location where customers
put it using the 'Send to developers' action. The option is available from inside the VPN.
added optional parameter connSettings.dbIndex for RedisClient constructor. If specified and > 0 then client will
call SELECT dbIndex command just after connect - select an active database. See https://redis.io/commands/select/
App.authFromRequest: added 3d optional parameter - fallbackAuthToken. If passed - will be used by UB schema
authorization if no other token (in headers\cookies\session_signature URI parameter) found (works for UB server 5.23.10)
all calls of App, Session and all entities event handlers (like insert:before etc.) now written into log
on Trace level (new feature of EventEmitter in server 5.23.9)
It's recommended to use a named functions for handlers, like uba_userCertificate.on('insert:after', function defineCertProps() {})
instead of anonymous function uba_userCertificate.on('insert:after', () => {}). This allows to log a handler name/
Calls of handlers, what added using App.wrapEnterLeaveForUbMethod is not traced by EventEmitter, since it calls is already traced by App.logEnter/Leave
new method App.blobStores.getContentPathAndBlobInfo - returns both contentPath (as well as blobStores.getContentPath)
and blobInfo (JSON stored in the DB)
JSON schema for ubConfig.json extended by redis parameters for sessions and global cache (introduced in UB@5.23.7)
new methods App.memCacheGet/App.memCachePut - get/put value from memory cache. Memory cache shared between all threads of current instance.
If you are completely sure that the value should be used by only one instance, use this function, otherwise use `globalCacheGet/Put'
improved App.reloadConfig - read only cached index.html pages from the global cache, instead of reading the entire cache and filtering locally.
If redis is used for the global cache, it matters
/models and /static endpoints will use memCache instead of globalCache to store resolved file paths
x10 speed-up of domain initialization: workaround for "Something wrong in entity JSON" exception followed by "FreeRootedValue",
solved by calling gc() before each entity initialization slow down a lot. So changed to call gc() once per 10 entities
added DESC index on uba_auditTrail.actionTime. Many project uses this attribute for filtering/sorting.
Should not affect insertion time, since value always increased. But migration (index creation) can be slow
ubcl migrate: if redis is configured for session or global cache storage, ubcl migrate will flush (clear all data) for
Redis database, specified in ubConfig.application.redis after executing all migrations
in case applied migration SHA stored in DB nose not match file SHA - do not throw, but only put error in console
ub_version entity is extended by initialVersion && initializedAt attributes:
for new apps ubcli initialize fill both attributes by current models versions
for existed apps on first run after updates to 5.25 ubcli migrate will fill initialVersion by current model versions
in case model is added into existed app ubcli migrate fill both by current model version
Migrations with version <= initialVersion will always be skipped.
This allows you to add new models to an existing application
ubcli createCodeInsightHelper now generate entity stubs according to ESLint JSDoc requirements
ubcli generateDDL will not create a (sourceID, destID) primary key in case either sourceID or destID is mapped.
In such cases many-to-many table is defined manually, ID used as primary key and developer should define (sourceID, destID) index manually
ubq model scheduler initialization now uses memCache instead of globalCache.
This allows you to run multiple instances of the scheduler in one server group.
new ubConfig parameter application.customSettings.mailerConfig.useExternalScheduler (false by default).
If true - mailQueue.queueMail will put messages into ubq_messages even in case customSettings.mailerConfig.enableScheduler is false.
Can be used if mail sending job is called using external scheduler (some external message queue)
optimized ubs_numcounter.getRegnum by avoid 2 unnecessary select before update.
We can safely use __skipSelectBeforeUpdate: true for ubs_numcounter because entity is not audited.