Determines the changed configuration files based on Git data and performs a partial load into the infobase.
If the changes include
Configuration.xml, the platform will perform a full configuration load, and not only the changed objects.
A deleted object will be removed from the database only if it is also deleted from the owner's composition (
ChildObjectsof the object orConfiguration.xml). A deleted file that is part of an object (a module, filesExt/) is not deleted by partial loading: the script will list such deletions in[ВНИМАНИЕ], and if there is nothing else to load besides them, it will terminate with an error. They can only be applied by a full load (/db-load-xml -Mode Full); to remove a module's code, it is enough to leave the file empty.
Usage
/db-load-git [database]
/db-load-git dev — все незафиксированные изменения
/db-load-git dev -Source Staged — только staged
/db-load-git dev -Source Commit -CommitRange "HEAD~3..HEAD"
/db-load-git dev -DryRun — только показать что будет загружено
Connection parameters
Read .v8-project.json from the project root and resolve the database:
- If the user specified connection parameters (path, server) — use them directly
- If they specified the database by name — search by id / alias / name in
.v8-project.json - If they did not specify — match the current Git branch with
databases[].branches - If the branch did not match — use
defaultPlatform —v8pathof the found database entry, otherwise the rootv8path. If it is not set in either place —-V8Pathdo not pass. If the file does not exist — suggest/db-list add. If the database used is not registered — after execution, suggest adding it via/db-list add. If the database entry specifiesconfigSrc— use it as the configuration directory.
Command
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-git.ps1" <параметры>
Script parameters
| Parameter | Required | Description |
|---|---|---|
-V8Path <путь> |
no | Platform bin directory, or the full path to 1cv8.exe / ibcmd.exe |
-InfoBasePath <путь> |
* | File database |
-InfoBaseServer <сервер> |
* | 1C server (for a server database) |
-InfoBaseRef <имя> |
* | Database name on the server |
-UserName <имя> |
no | User name |
-Password <пароль> |
no | Password |
-ConfigDir <путь> |
yes | XML upload directory (git repository) |
-Source <источник> |
no | All (default) / Staged / Unstaged / Commit |
-CommitRange <range> |
for Commit | Commit range (e.g. HEAD~3..HEAD) |
-Extension <имя> |
no | Upload to extension |
-NoApplyCheck |
no | Do not check extension applicability after upload |
-Format <формат> |
no | Hierarchical (default) / Plain |
-DryRun |
no | Only show what will be uploaded (without uploading) |
-UpdateDB |
no | Immediately update the DB configuration after upload (/UpdateDBCfg) |
-AdditionalV8Arguments <список> |
no | Additional launch arguments 1cv8.exe separated by commas, e.g. /UseHwLicenses+ |
-AdditionalIbcmdArguments <список> |
no | Additional arguments ibcmd separated by commas, in the form --ключ=значение |
*— either-InfoBasePath, or the pair-InfoBaseServer+-InfoBaseRef
After execution
If -UpdateDB was not specified — suggest /db-update for applying changes to the DB
Examples
# Все незафиксированные изменения
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-git.ps1" -V8Path "C:\Program Files\1cv8\8.3.25.1257\bin" -InfoBasePath "C:\Bases\MyDB" -ConfigDir "C:\WS\cfsrc" -Source All -UpdateDB
# Из диапазона коммитов
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/db-load-git.ps1" -InfoBasePath "C:\Bases\MyDB" -ConfigDir "C:\WS\cfsrc" -Source Commit -CommitRange "HEAD~3..HEAD"