SuperAPI AI Directory

db-load-git

General & other

View repository

Updated 10-15 21:03

About this skill

/db-load-git — Loading changes from Git

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 (ChildObjects of the object or Configuration.xml). A deleted file that is part of an object (a module, files Ext/) 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:

  1. If the user specified connection parameters (path, server) — use them directly
  2. If they specified the database by name — search by id / alias / name in .v8-project.json
  3. If they did not specify — match the current Git branch with databases[].branches
  4. If the branch did not match — use default Platform — v8path of the found database entry, otherwise the root v8path. If it is not set in either place — -V8Path do 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 specifies configSrc — 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"