2.1 KiB
2.1 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:45:09.055203+00:00 | zai-org/GLM-5-FP8 | 1 | 23d0d5081a0df6ea |
Documentation: LocalSQLDB Module
1. Purpose
This module provides installer custom actions for preparing LocalDB database files during DataPRO installation. It determines whether the application will use a local or centralized database configuration, and if local, copies database files (.mdf and .ldf) from a previous installation to the new installation directory. This enables database migration during upgrades while preserving existing data.
2. Public Interface
LocalDBPreparation (Class)
Entry point class invoked by the installer.
Method: Main(string[] args)
- Signature:
static void Main(string[] args) - Behavior: Parses command-line arguments, creates a
LocalDBPrepareinstance, and invokesPrepareDB(). On exception, displays a message box with the error message and rethrows an emptyException.
Arguments:
args[0]— Target installation directory path (targetDir)args[1]— Product version string (parsed intoVersion)
LocalDBPrepare (Class)
Core logic class for database preparation.
Constructor: LocalDBPrepare(string targetDir, Version productVersion)
- Initializes the instance with the target directory and installing version.
Method: PrepareDB()
- Signature:
public bool PrepareDB() - Behavior:
- Loads configuration from the newly installed executable via
GetNewConfig() - Determines
DbTypefrom configuration (defaults toDbType.Localon parse failure) - Returns
falseifDbType.Centralized - Retrieves
dbNamefrom configuration (defaults toSettings.Default.DataPRO) - Returns
trueifdbNamematchesSettings.Default.DataPRO(case-insensitive) - Otherwise, copies
.mdfand.ldffiles from the most recent previous installation to the new location
- Loads configuration from the newly installed executable via