Function: createDatabaseTables()
createDatabaseTables(
db:Database):void
Defined in: electron/services/database/utils/databaseSchema.ts:170
Creates all required database tables if they do not exist.
Parameters
db
The Database instance to create tables on.
Returns
void
Remarks
Creates the following tables:
sites: Site configuration and monitoring statusmonitors: Monitor configuration and runtime data (dynamic schema)history: Historical monitoring datasettings: Application configurationstats: Runtime statisticslogs: Application logs
Uses dynamic schema generation for the monitors table. All table creation operations are idempotent.
Throws
When table creation fails. Errors are logged and re-thrown for upstream handling.