Creates a new 1C infobase (file or server) and offers to register it in .v8-project.json.
Usage
/db-create <path> — файловая база по указанному пути
/db-create <server>/<name> — серверная база
/db-create — интерактивно
Connection parameters
Read .v8-project.json from the project root for v8path (path to the platform).
If v8path is not set — auto-detection: Get-ChildItem "C:\Program Files\1cv8\*\bin\1cv8.exe" | Sort -Desc | Select -First 1
After creating the base, offer to register via /db-list add.
Command
powershell.exe -NoProfile -File .claude/skills/db-create/scripts/db-create.ps1 <параметры>
Script parameters
| Parameter | Required | Description |
|---|---|---|
-V8Path <путь> |
no | Platform bin directory (or full path to 1cv8.exe) |
-InfoBasePath <путь> |
* | Path to the file base |
-InfoBaseServer <сервер> |
* | 1C server (for a server base) |
-InfoBaseRef <имя> |
* | Base name on the server |
-UseTemplate <файл> |
no | Create from a template (.cf or .dt) |
-AddToList |
no | Add to the 1C base list |
-ListName <имя> |
no | Base name in the list |
*— either-InfoBasePathis needed, or the pair-InfoBaseServer+-InfoBaseRef
Return codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error (see log) |
After creation
- Read the log file and show the result
- Offer to register the base in
.v8-project.json(via/db-list add) - If a template is specified
/UseTemplate— warn that the configuration will be loaded from the template
Examples
# Создать файловую базу
powershell.exe -NoProfile -File .claude/skills/db-create/scripts/db-create.ps1 -InfoBasePath "C:\Bases\NewDB"
# Создать серверную базу
powershell.exe -NoProfile -File .claude/skills/db-create/scripts/db-create.ps1 -InfoBaseServer "srv01" -InfoBaseRef "MyApp_Test"
# Создать из шаблона CF
powershell.exe -NoProfile -File .claude/skills/db-create/scripts/db-create.ps1 -InfoBasePath "C:\Bases\NewDB" -UseTemplate "C:\Templates\config.cf"
# Создать и добавить в список баз
powershell.exe -NoProfile -File .claude/skills/db-create/scripts/db-create.ps1 -InfoBasePath "C:\Bases\NewDB" -AddToList -ListName "Новая база"