Database Reference
Summary
This document describes the Velox database architecture as implemented in the velox repository. It covers logical databases, connection configuration, connection pooling, module persistence, major tables, relationships, indexes, and migrations.
The source code is the authority for this document. Where behavior could not be determined from the reviewed code, it is marked as unclear.
Related PKB Documents
- Architecture
- Domain Model
- Developer Guide
- Configuration Reference
- Flow Execution
- Logging Reference
- Error Reference
- API Reference
- Technical Debt
Source Code Locations
| Area | Source location |
|---|---|
| System connection model | Classes/vxCon.pas |
| System DB data module | Classes/dmSystemDB.pas |
| Database connection parameters | Classes/vxDBParams.pas |
| SQL connection wrapper | Classes/vxSQLConnection.pas |
| System connection pool | Classes/vxConPool.pas |
| DB Connection pool | Classes/vxSQLConPool.pas |
| SQL builder and schema helper | Classes/vxSQL.pas |
| Database upgrade controller | Classes/GUI/vxDBUpdate.pas |
| Database upgrade versions | Classes/GUI/vxDBUpdateVersion.pas |
| Database upgrade form | Forms/frmDatabaseUpgrade.pas |
| Base module persistence | Classes/vxModule.pas |
| Setup persistence | Classes/vxSetup.pas |
| Flow persistence | Classes/vxActionMan.pas |
| API persistence | Classes/vxAPI.pas |
| DB Connection persistence | Classes/vxDBCon.pas |
| DB Definition persistence | Classes/vxDBDef.pas |
| File Connection persistence | Classes/vxFileCon.pas |
| File Definition persistence | Classes/vxFileDef.pas |
| Folder persistence | Classes/vxFolder.pas |
| Map persistence | Classes/vxMap.pas |
| Report persistence | Classes/vxReport.pas |
| SQL Script persistence | Classes/vxSQLScript.pas |
| Scriptlet persistence | Classes/vxScriptlet.pas |
| Variable persistence | Classes/vxVariableGroup.pas |
| Module relation sync utility | Forms/frmModuleSync.pas, Classes/GUI/vxModuleSync.pas |
| FID lookup helpers | Classes/Tools/vxFID.pas |
| Constants and current database version | Classes/Tools/vxConstant.pas |
Important Classes, Forms, and Services
| Type | Name | Purpose |
|---|---|---|
| Class | TvxConnection | Loads Connections.json, selects active production/test config, log, and data databases, and provides SQLC, SQLL, and SQLD accessors. |
| Class | TvxDBParams | Holds one database connection definition: host type, host, database name, authentication, username, encrypted password, driver, and certificate trust flag. |
| Class | TvxSQLConnection | TSQLConnection descendant that applies Velox connection parameters, wraps transactions, tracks owning thread, and integrates with connection pools. |
| Class | TvxSysConPool / TvxSysConItem | Thread-aware connection pool for system config/log/data databases. |
| Class | TvxSQLConPool / TvxSQLConItem | Thread-aware connection pool for user-configured DB Connections. |
| Class | TvxSystemDB | Per-module data module that creates config/log/data queries and binds ReportBuilder pipelines for module template persistence. |
| Class | TvxSQL | SQL builder and DDL/DML helper used by migrations and module utilities. |
| Class | TVxDBUpdate | Checks database version and orchestrates version upgrade threads. |
| Class | TVxDBUpdateVersion* | One migration thread per database version. |
| Class | TvxModule | Base class for most persisted Velox modules. |
| Class | TvxModuleTemplate | ReportBuilder template wrapper used to serialize/deserialize module component graphs. |
| Class | TvxLog | Runtime log module persisted to VX_LOG and related log tables. |
| Form | TDatabaseUpgrade | Modal database upgrade UI shown when the database version is behind the Velox MajorVersion. |
| Form | TModuleSync | Maintenance UI that creates and uses VX_REFS while rebuilding module references. |
| Service | VeloxService | Loads database configuration at service startup and uses the same connection/persistence layer. It does not run the reviewed database upgrade check. |
| Service | VeloxAPIService | Loads database configuration at API service startup and uses the same connection/persistence layer. It does not run the reviewed database upgrade check. |
Overall Database Architecture
Velox separates database usage into three logical roles:
| Logical database | Accessor | Purpose | Source-observed behavior |
|---|---|---|---|
| Config database | gSystemConnection.SQLC / TvxSystemDB.NewConfigQuery | Stores Velox configuration modules, setup, flows, definitions, maps, transports, APIs, variables, and migration version. | Primary source of module configuration. |
| Log database | gSystemConnection.SQLL / TvxSystemDB.NewLogQuery | Intended to store runtime logs. | In reviewed code, SQLL currently returns SQLC; comments state duplicate log connections are not used yet. |
| Data database | gSystemConnection.SQLD / TvxSystemDB.NewDataQuery | Represents the active Velox data database used by runtime/data processing. | The Velox repository references the connection, but the VxData schema itself is outside the reviewed Velox system schema migration code. |
Each logical role has production and test connection definitions:
ConfigandConfigTestLogandLogTestDataandDataTest
TvxConnection.TestMode chooses the active production or test set. SwitchSystemConnectionMode changes the mode and clears system/user connection pools.
Database Architecture Diagram
Database Platform Support
The type definitions list these database connection types:
- Microsoft SQL Server
- Oracle
- MySQL
- PostgreSQL
- IBM DB2
- ADO
- ODBC
However, the reviewed TvxSQLConnection.VxConnect implementation only shows concrete runtime parameter setup for ctMSSQL. The schema builder in TvxSQL also uses SQL Server system views and syntax such as sys.tables, sys.columns, sys.indexes, uniqueidentifier, GETDATE(), SCOPE_IDENTITY(), and sp_rename.
Therefore:
- The Velox system/config/log schema migration path is SQL Server-specific in the reviewed code.
- The DB Connection feature exposes broader database types for user data connections and ReportBuilder data settings.
- Full runtime support for non-SQL Server database types cannot be confirmed from the reviewed connection implementation alone.
Configuration Loading
Database configuration is loaded from Connections.json under AppDataConfigPath.
TvxConnection.Create parses the JSON file, loads the Databases collection into TvxDBParams objects, and TvxConnection.Load selects one item from Connections.
JSON Concepts
| JSON area | Purpose | Source |
|---|---|---|
Databases | Defines named database connection profiles. | Classes/vxCon.pas, Classes/vxDBParams.pas |
Connections | Defines a Velox environment/profile by referencing named database profiles. | Classes/vxCon.pas |
DisplayName | User/service display name for the selected connection profile. | Classes/vxCon.pas |
ConfigNum | Numeric configuration identifier; required by TvxConnection.Load. | Classes/vxCon.pas |
ProdLabel / TestLabel | Optional labels. Defaults are Production and Test. | Classes/vxCon.pas |
Config, ConfigTest, Log, LogTest, Data, DataTest | Database profile keys for each logical role and mode. | Classes/vxCon.pas |
Database Parameter Fields
| Field | Purpose | Notes |
|---|---|---|
Key | Name used by a connection profile to reference the database definition. | Required for lookup. |
HostType | Database type enum. | Defaults to ctMSSQL. |
Host | Server/host name. | Used as HostName for SQL Server. |
Database | Database/catalog name. | Used as Database for SQL Server. |
AuthType | SQL authentication enum. | Defaults to Windows Authentication. |
Username | Database username. | Used for SQL Server params. |
Password | Encrypted password value. | Getter decrypts with DecryptString; setter stores loaded value as-is. |
Driver | SQL Server driver selection. | Uppercased on load. MSOLEDBSQL selects OLE DB SQL Server driver behavior. |
TrustCertificate | Trust server certificate flag. | Adds TrustServerCertificate=True to custom connection string for SQL Server. |
Connection Pooling and Threading
Velox uses thread-aware connection pools.
System Connection Pool
gSysConPool is used for system config/log/data connections. TvxSysConPool.Load creates six pool slots by PoolIndex:
| Pool index | Connection role |
|---|---|
0 | Config |
1 | Log |
2 | Data |
3 | ConfigTest |
4 | LogTest |
5 | DataTest |
Each TvxSysConItem holds per-thread TvxSQLConnection instances. When a thread asks for a connection, the pool reuses an existing connection for that thread, reclaims an idle connection with ThreadId = 0, or creates a new connection.
User DB Connection Pool
gSQLConPool is used for configured TvxDBCon modules. It groups connections by DB Connection FID and then by thread. It copies DB Connection options such as:
DisconnectAfterUseUseASAliasForceAliasUseSingleBackQuoteConnectionType
Cleanup
Both system and DB Connection pools have cleanup threads:
TSysCleanUpThreadTSQLCleanUpThread
They wait DB_CLEANUP_DELAY minutes. The current constant is 22 minutes. Idle connections with ThreadId = 0 and stale LastAccess are disconnected and freed.
Transactions
TvxSQLConnection exposes:
VxStartTransactionVxCommitTranVxRollbackTran
Transactions are used directly by code such as TvxModule.DeleteModule. Flow-level transaction behavior is documented in Flow Execution.
Persistence Architecture
Most Velox configuration concepts are persisted as TvxModule descendants.
Module persistence has two layers:
- Searchable columns in
VX_*tables store identifiers, folder membership, names, active/archive flags, revisions, and selected module-specific fields. - The full component graph is serialized through
TvxModuleTemplateinto blob columns such asMODULE,DATAMODULE, andREPORTMODULE.
Module Persistence Flow
Common Module Fields
TVxSQL.AlterTable_Data defines common fields used by standard module tables:
| Field | Purpose |
|---|---|
FID | GUID primary key created by CreateTable_Data. |
FOLDERFID | Logical folder link to VX_FOLDER.FID. |
PARENTFID | Parent/versioning/reference field used by module workflows. |
MODULENAME | Display/module name. |
PRODREVISION | Production revision counter. |
TESTREVISION | Test revision counter. |
ACTIVE | Active flag, default 1. |
ARCHIVED | Archived flag, default 0. |
TAGS | Tag/search text. |
CHANGENOTE | Change note. Added by later default-field migration helper. |
DESCRIPTION | Memo description. |
MODULETYPE | Delphi class name/type string. |
MODULE | Serialized component graph. |
CREATEDDATE | Created timestamp, default GETDATE(). |
UPDATEDDATE | Updated timestamp. |
VX_DBDEF and VX_FILEDEF also have DATAMODULE. VX_REPORT also has REPORTMODULE.
Serialization
TvxModule.CreateModuleTemplate configures the template as:
DatabaseSettings.NameField = 'FID'DatabaseSettings.TemplateField = 'MODULE'Format = ftASCIISaveTo = stdatabase
TvxModule.LoadModuleTemplate calls LoadFromDatabase; TvxModule.SaveModuleTemplate calls SaveToDatabase.
TvxModuleTemplate has FUseJSON := False, so the reviewed module persistence path is ReportBuilder/Delphi template serialization, not JSON.
Major Tables
The current effective database version is 309 from Classes/Tools/vxConstant.pas. Tables introduced only by updater classes beyond version 309 are marked separately.
Configuration and Module Tables
| Table | Primary key | Purpose | Important columns | Important classes/source |
|---|---|---|---|---|
VX_SETUP | FID | Global Velox setup module. | Common module fields plus DEFAULTFILEPATH, APIADDRESS, WEBADDRESS, WEBINSTALLPATH. | TvxSetup, Classes/vxSetup.pas, Classes/GUI/vxDBUpdateVersion.pas |
VX_FOLDER | FID | Folder tree/grouping for modules. | Common module fields plus FOLDERFID, MODULEMASK. | TvxFolder, Classes/vxFolder.pas |
VX_DBCON | FID | Configured database connections. | Common module fields; detailed connection options are serialized in MODULE. | TvxDBCon, Classes/vxDBCon.pas |
VX_DBDEF | FID | Database data definitions. | Common module fields plus DATAMODULE. | TvxDBDef, Classes/vxDBDef.pas |
VX_FILECON | FID | Configured file connections/folders. | Common module fields plus COUNTER, MAINFILEPATH, ERRORFILEPATH, ISSUEFILEPATH, DUPFILEPATH, retry fields. | TvxFileCon, Classes/vxFileCon.pas |
VX_FILEDEF | FID | File data definitions. | Common module fields plus DATAMODULE. | TvxFileDef, Classes/vxFileDef.pas |
VX_MAP | FID | Data maps between source and destination definitions. | Common module fields plus SOURCEFID, SOURCETYPE, SOURCENAME, DESTINATIONFID, DESTINATIONTYPE, DESTINATIONNAME. | TvxMap, Classes/vxMap.pas |
VX_REPORT | FID | Report modules. | Common report fields plus REPORTMODULE. | TvxReport, Classes/vxReport.pas |
VX_SCRIPTLET | FID | Reusable scriptlets. | Common module fields. Script body/config appears in serialized MODULE. | TvxScriptlet, Classes/vxScriptlet.pas |
VX_SQLSCRIPT | FID | SQL script modules. | Common module fields. SQL script content/config appears in serialized MODULE. | TvxSQLScript, Classes/vxSQLScript.pas |
VX_TRANSPORT | FID | Inbound/outbound transports. | Common module fields plus DIRECTION; detailed transport settings are serialized in MODULE. | Transport classes, Classes/Transports, migration source |
VX_ACTION | FID | Flow/action modules. | Common module fields plus schedule fields, monitor fields, REST metadata, request/response definition FIDs, linked action fields. | TvxActionMan, Classes/vxActionMan.pas |
VX_VARIABLE | FID | Variable groups. | Common module fields plus CODE. | TvxVariableGroup, Classes/vxVariableGroup.pas |
VX_API | FID | API/OpenAPI module definitions. | Common module fields plus API version, description, schema name, server URLs, groups, terms, contact/license/documentation fields. | TvxAPI, Classes/vxAPI.pas |
VX_DOC | FID | Document/file metadata and binary storage table created by migration version 305. | PARENTFID, ARCHIVED, TAGS, DESCRIPTION, FILEPATH, FILENAME, FILEEXT, FILEHASH, FILEDATA, timestamps. | Classes/GUI/vxDBUpdateVersion.pas, Classes/Tools/vxFID.pas; full lifecycle unclear from reviewed code. |
Relationship and Bridge Tables
| Table | Primary key | Purpose | Important columns | Source |
|---|---|---|---|---|
VX_RELATION | NUM identity | Denormalized dependency table between parent and child modules. | Parent FID/type/name/folder/archive fields, child FID/type/name/folder/archive fields, CREATEDDATE. | TvxModule.SaveModuleRelations, TvxModule.SaveChildRelation, migration version 307 |
VX_API_ACTION | NUM identity | Links API modules to REST flow/action modules. | APIFID, ACTIONFID, ACTIVE, timestamps. | TvxAPI, Forms/frmSetupAPI.pas, migration version 308 |
VX_REFS | NUM identity | Temporary/maintenance reference table used by module sync. | FID, FID2, MODULETYPE, MODULENAME, FOLDERNAME, TABLENAME, DIRECTION, ARCHIVED, ORDERNO. | Forms/frmModuleSync.pas, Classes/GUI/vxModuleSync.pas |
Log Tables
Log tables use identity NUM primary keys for high-volume runtime data. The migration comments state this is to avoid clustered primary key fragmentation from GUID keys.
| Table | Primary key | Purpose | Important columns | Source |
|---|---|---|---|---|
VX_LOG | NUM identity | Runtime flow/transport/log execution record. | CONFIGNUM, FID, STATUS, HANDLED, STARTDATE, ENDDATE, MODULENAME, LOGTYPE, ACTIONFID, TRANSPORTFID, FOLDERFID, TEST, EXECUTERNAME, MODULETYPE, MODULE, REPORTED, NOTIFIED. | TvxLog, migration versions 302 and 306 |
VX_LOG_ITEM | NUM identity | Log messages/items attached to a log. | LOGNUM, LEVEL, STATUS, DESCRIPTION, CREATEDDATE. | TvxLogItem, TvxLog, migration version 302 |
VX_LOG_FILE | NUM identity | File events and optional file data captured during execution. | FILECONFID, FILEDEFFID, TRANSPORTFID, TRANSPORTTYPE, FILEPATH, FILENAME, FILEEXT, FILEHASH, EVENT, TEST, DOWNLOADNOTE, FILEDATA, FILESIZE. | TvxLogFile, migration versions 302, 305, 306, 308 |
VX_LOG_FILE_LINK | NUM identity | Links logs to file events. | LOGNUM, LOGFILENUM, EVENT, timestamps. | TvxLogFile, migration version 302 |
VX_LOG_TRANSPORT | NUM identity | Transport send/receive/retry log detail. | LOGFILENUM, FILECONFID, FILEDEFFID, ACTIONFID, TRANSPORTFID, TRANSPORTTYPE, STATUS, HANDLED, TEST, attempts/dates, email flags, comms flags, TAGDATA. | TvxLogTransport, migration versions 302, 303, 307 |
VX_LOG_TRANSPORT_LINK | NUM identity | Links logs to transport log records. | LOGNUM, LOGTRANSPORTNUM, STATUS, timestamps. | TvxLogTransport, migration version 302 |
VX_LOG_SQL | NUM identity | Captures SQL text associated with execution/logging. | LOGNUM, TYPE, SQLTEXT, CREATEDDATE. | TvxLog, migration version 303 |
VX_LOG_TRACE | NUM identity | Captures trace text. | LOGNUM, TRACETEXT. | TvxLog, migration version 303 |
VX_LOG_TAG | NUM identity | Tag values associated with logs and log files. | LOGNUM, LOGFILENUM, TAG, TAGVALUE. | TvxLog, migration versions 303 and 305 |
Version and Future Tables
| Table | Current status | Purpose | Source-observed notes |
|---|---|---|---|
VX_VERSION | Current schema table | Stores one VERSION integer. | TVxDBUpdate.GetVersionFromDatabase reads it. TVxDBUpdateVersion.SetVersionToDatabase upserts it after each successful upgrade. |
VX_ERROR | Source contains version 310 updater, but current MajorVersion is 309 | Intended error management table. | The version 310 updater sets DB.Table := 'VX_ERROR' and calls AlterTableAdd without first creating FID; full schema and runtime use were not found. |
Relationships
The reviewed schema code does not create foreign keys. Relationships are logical and code-managed.
Main Configuration Relationships
Log Relationships
Relationship Maintenance
TvxModule.SaveModuleRelations deletes existing VX_RELATION rows for the parent module and then asks descendant classes to save child relationships through SaveModuleRelationChilds.
TvxModule.DeleteModule checks VX_RELATION for parents that reference the module being deleted. If references exist, Designer can warn the user before deletion.
TModuleSync uses VX_REFS to rebuild module FIDs and relation information. It deletes historical revision rows where PARENTFID is not null, truncates VX_RELATION, and repopulates references from module tables.
Indexes
Primary Keys
TVxSQL.CreateTable creates a clustered primary key named PK_<table> on the field(s) currently registered with the builder. In reviewed migrations:
- Standard module tables use
FID uniqueidentifieras the primary key. - High-volume log/link/bridge/maintenance tables use
NUM bigint identity(1,1)as the primary key.
Explicit Index Catalog
| Index | Table | Columns | Purpose/source note |
|---|---|---|---|
IDX_LOG_FID | VX_LOG | FID | Log lookup by log GUID. |
IDX_LOG_SEARCH | VX_LOG | ACTIONFID, STARTDATE, STATUS, HANDLED, TEST | Manage Logs search. |
IDX_LOG_STARTDATE | VX_LOG | STARTDATE | Date-based log lookup. |
IDX_LOGFILE_FILECONFID | VX_LOG_FILE | FILECONFID | File connection lookup. |
IDX_LOGFILE_SEARCH | VX_LOG_FILE | CREATEDDATE, FILENAME | File log search. |
IDX_LOGFILELINK_LOGFILENUM | VX_LOG_FILE_LINK | LOGFILENUM | File link lookup by file log number. |
IDX_LOGFILELINK_SEARCH | VX_LOG_FILE_LINK | LOGNUM, LOGFILENUM | Log/file join lookup. |
IDX_LOGTRANSPORT_LOGFILENUM | VX_LOG_TRANSPORT | LOGFILENUM | Transport lookup by file log number. |
IDX_LOGTRANSPORT_SEARCH | VX_LOG_TRANSPORT | TRANSPORTFID, FILECONFID, CREATEDDATE, STATUS, LOGFILENUM | Transport log search. |
IDX_LOGTRANSPORT_SEND | VX_LOG_TRANSPORT | TRANSPORTFID, STATUS, NEXTATTEMPTDATE, LOGFILENUM | Outbound send/retry lookup. |
IDX_LOGTRANSPORTLINK_LOGTRANSPORTNUM | VX_LOG_TRANSPORT_LINK | LOGTRANSPORTNUM | Transport link lookup. |
IDX_LOGTRANSPORTLINK_SEARCH | VX_LOG_TRANSPORT_LINK | LOGNUM, LOGTRANSPORTNUM | Log/transport join lookup. |
IDX_LOGITEM_LOGNUM_DESCRIPTION | VX_LOG_ITEM | LOGNUM, DESCRIPTION | Log item lookup/search. |
IDX_LOGSQL_LOGNUM_SQLTEXT | VX_LOG_SQL | LOGNUM, SQLTEXT | SQL log search. |
IDX_LOGTAG_LOGNUM_TAG_TAGVALUE | VX_LOG_TAG | LOGNUM, TAG, TAGVALUE | Tag lookup/search. |
IDX_ACTION_LINKEDACTION | VX_ACTION | LINKEDACTIONFID, LINKEDACTIONORDER | Linked flow ordering. |
IDX_RELATION_PARENTFID | VX_RELATION | PARENTFID | Parent dependency lookup. |
IDX_RELATION_CHILDFID | VX_RELATION | CHILDFID, CHILDTYPE | Child dependency lookup. |
IDX_RELATION_PARENTCHILDFID | VX_RELATION | PARENTFID, CHILDFID, CHILDTYPE | Parent/child duplicate/lookup support. |
IDX_ACTION_EXECUTIONSEARCH | VX_ACTION | PARENTFID, ARCHIVED, EXECUTION | Designer execution search. |
IDX_ACTION_SERVICESEARCH | VX_ACTION | ACTIVE, ARCHIVED, EXECUTION | Service loading. |
IDX_API_EXECUTIONSEARCH | VX_API | PARENTFID, ARCHIVED | Designer API tree/search. |
IDX_API_SERVICESEARCH | VX_API | PARENTFID, ACTIVE, ARCHIVED | API service/search support. |
IDX_TRANSPORT_EXECUTIONSEARCH | VX_TRANSPORT | PARENTFID, ARCHIVED, DIRECTION | Designer transport search. |
IDX_TRANSPORT_SERVICESEARCH | VX_TRANSPORT | ACTIVE, ARCHIVED, DIRECTION | Service transport loading. |
IDX_VARIABLE_CODE | VX_VARIABLE | CODE | Variable lookup by code. |
Generated Search Indexes
TVxSQL.IndexSearchDefaultFields creates two standard indexes:
| Pattern | Columns |
|---|---|
IDX_<table without VX_>_TREESEARCH | PARENTFID, FOLDERFID, ARCHIVED, FID |
IDX_<table without VX_>_COMBOSEARCH | PARENTFID, ARCHIVED, FID |
Version 307 creates these indexes for:
VX_ACTIONVX_DBCONVX_DBDEFVX_FILECONVX_FILEDEFVX_FOLDERVX_MAPVX_REPORTVX_SCRIPTLETVX_SETUPVX_SQLSCRIPTVX_TRANSPORT
Version 308 also creates them for VX_API.
Version 310 would create them for VX_ERROR, but version 310 is not the current effective target version because MajorVersion = 309.
Migrations
Velox migrations are code-based, not standalone SQL scripts in the reviewed repository.
Version Check
TVxDBUpdate.GetVersionFromDatabase reads:
select VERSION from VX_VERSION- a decrypted legacy query for
FLO_VERSIONifVX_VERSIONis not available
TVxDBUpdate.RequireUpdate compares that value to MajorVersion.
Current source value:
MajorVersion = 309
Upgrade Execution
Designer startup runs:
SwitchSystemConnectionMode(True)CheckDatabaseUpgrade(True)
With aCheckBoth = True, the updater checks the active test config/log accessors, switches to production, then checks production config/log accessors.
Important source-observed caveat: in the reviewed code, SQLL returns SQLC, so the log database accessor currently points to the config connection. This means the reviewed upgrade path does not show an independent log database upgrade despite the logical Log/LogTest configuration fields.
The services load the configured connection and start. The reviewed VeloxService.dpr and VeloxAPIService.dpr do not call CheckDatabaseUpgrade; they appear to rely on Designer or another operational process to keep the database schema current before service startup.
Migration Version Summary
| Version | Main changes |
|---|---|
300 | Renames old FLO_* tables, creates primary module tables, creates VX_VERSION, creates blank setup row. |
301 | Creates/adds VX_SCRIPTLET. |
302 | Creates log tables and log indexes; adds default fields to module tables; adds action/map/transport/file fields; migrates FTP/SFTP class data. |
303 | Adds SQL, trace, and tag log tables and indexes. |
304 | Adds/normalizes ARCHIVED default fields. |
305 | Converts binary fields, adds REST/file/setup/log fields, creates VX_DOC, creates VX_SQLSCRIPT, adds tags/descriptions. |
306 | Adds reported/notified flags to VX_LOG, adds transport fields to VX_LOG_FILE, and shifts file event enum values for existing rows. |
307 | Adds linked action fields, creates VX_RELATION, creates relation indexes, adds parent/change-note fields, creates standard search indexes, optimizes legacy indexes/constraints. |
308 | Adds web setup fields, folder module mask, file retry fields, log file size, REST request/response fields, creates VX_API and VX_API_ACTION, and creates action/API/transport service/search indexes. |
309 | Creates or updates VX_VARIABLE, adds CODE, creates IDX_VARIABLE_CODE, updates folder module masks. This is the current effective target version. |
310 | Source contains a future/error table updater for VX_ERROR, but current MajorVersion is 309. |
311 | Source contains an empty updater class. The dispatcher currently maps version 311 to TVxDBUpdateVersion310, not TVxDBUpdateVersion311. This is source-observed and may be accidental. |
Migration Development Notes in Source
The header comments in vxDBUpdateVersion.pas give the workflow for adding a migration:
- Increase
vxConstant.MajorVersion. - Set the Velox version minimum needed.
- Copy the latest update class to create the next version class.
- Add database code to the update class.
- Add the version to
TVxDBUpdate.UpdateDatabase.
Configuration and Persistence Data Flow
Areas That Are Unclear or Source-Observed Caveats
- The reviewed system schema migration code is SQL Server-specific, even though DB Connection type definitions list other database platforms.
SQLLcurrently returnsSQLC; independent log database use is configured conceptually but not active in the reviewed accessor implementation.- The database upgrade check is visible in Designer startup, but not in the reviewed service startup paths.
VX_DOCis created and has an FID lookup helper, but a complete document module lifecycle was not found in the reviewed code.VX_ERRORis present in a future version 310 updater, but the current effectiveMajorVersionis 309.- The version 311 dispatcher entry creates
TVxDBUpdateVersion310, whileTVxDBUpdateVersion311exists and is empty. This may be accidental; the code should be treated as the current source of truth until changed. - No foreign-key creation was found in the reviewed schema builder or migrations. Relationships are enforced by application logic and denormalized dependency rows.
TVxSQL.IndexSearchDefaultFieldsregistersARCHIVEDwithftGuidwhile indexing an archived flag column. The field type is not used by index SQL generation, so this did not appear to affect generated index column names, but it is a source-observed inconsistency.