@databricks-solutions/lakebase-scm-utils

中文文档
0.3.16发布于 2026/11/10SEE LICENSE IN LICENSE.mdTypeScriptESM + CJS近 30 天下载 4264

Lakebase SCM + substrate engine: database branching, paired-branch SCM workflows, connection/credential minting, schema migration, project scaffold + deploy primitives, and the git/github utility layer. Extracted from consort for portable, standalone cons

原始使用文档
文档目录4 节
  1. Why this exists
  2. Scaffolded languages
  3. Install
  4. Development

@databricks-solutions/lakebase-scm-utils

The engine that makes application code and database schema travel together through one SCM workflow. It drives a single state machine (claim a feature branch, prepare a PR, wait for CI, merge) in which every git branch is paired with its own Lakebase Postgres branch, so the schema evolves in lockstep with the code and moves through the same gates. On every PR it forks a database branch, applies migrations, runs the tests against real Postgres, and posts the schema diff; a red run blocks the merge. On merge it migrates the target tier, then tears the feature and PR branches down. The same commands run whether a human drives them from the CLI / VS Code extension or an agent orchestrator (consort) drives them headless.

Under the hood it owns database branching, the paired-branch SCM workflow state machine, connection and credential minting, schema migration, project scaffold and deploy primitives, and the shared git / github / util layer: the portable substrate core shared by the lakebase-scm-extension IDE extension and the consort orchestration kit.

It ships two consumption surfaces:

  • Library API (for the VS Code extension lakebase-scm-extension and the Consort orchestration in consort): import the substrate from the package barrel or a sub-path.
    import { createBranch, getConnection } from "@databricks-solutions/lakebase-scm-utils";
    import { resolveGitHubToken } from "@databricks-solutions/lakebase-scm-utils/github";
    
  • CLIs (for scaffolded projects and CI): the lakebase-* and lakebase-scm-* bins, resolved on PATH by the lk shim.

Why this exists

The SCM workflows and their supporting substrate were originally embedded in consort alongside the Consort orchestration. They are extracted here so both the IDE extension and the Consort kit can depend on a single, versioned engine, for easier consumption and portability. The Consort orchestration stays in consort and depends back on this package.

Scaffolded languages

The scaffold + migration primitives support Java and Kotlin (Spring Boot / JPA, Flyway), Python (FastAPI / SQLAlchemy, Alembic), Node.js (Express / Knex), and .NET (ASP.NET Core / EF Core on Npgsql, with EF Core migrations or Flyway).

Install

Published to npm; consumers pin an exact version:

npm install @databricks-solutions/lakebase-scm-utils@<version>

(A GitHub ref also works: npm install github:databricks-solutions/lakebase-scm-utils#v<version>.) The package ships a pre-built dist/ on every tagged release, so a consumer install skips the build.

Development

npm install
npm run typecheck
npm test
npm run build

版本与发布记录

@databricks-solutions/lakebase-scm-utils 共发布 29 个版本,首次发布于 2026/09/24;过去 12 个月发布了 29 个版本。

版本发布日期距今
0.3.16latest2026/11/101 天前
0.3.152026/11/074 天前
0.3.142026/11/029 天前
0.3.132026/11/0110 天前
0.3.122026/10/3012 天前
0.3.112026/10/2814 天前

关于 @databricks-solutions/lakebase-scm-utils 的常见问题

@databricks-solutions/lakebase-scm-utils 是什么?

Lakebase SCM + substrate engine: database branching, paired-branch SCM workflows, connection/credential minting, schema migration, project scaffold + deploy primitives, and the git/github utility layer. Extracted from consort for portable, standalone cons

如何安装 @databricks-solutions/lakebase-scm-utils?

在项目目录运行 npm install @databricks-solutions/lakebase-scm-utils,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 lakebase-pr、lakebase-branch、lakebase-doctor、lakebase-cut-tier、lakebase-snapshot、lakebase-scm-merge、lakebase-scm-state、lakebase-cut-backup、lakebase-scm-doctor、lakebase-schema-diff、lakebase-scm-cleanup、lakebase-scm-wait-ci,可以用 npx lakebase-pr 直接运行。

@databricks-solutions/lakebase-scm-utils 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@databricks-solutions/lakebase-scm-utils 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@databricks-solutions/lakebase-scm-utils 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@databricks-solutions/lakebase-scm-utils 可以商用吗?

@databricks-solutions/lakebase-scm-utils 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@databricks-solutions/lakebase-scm-utils 的下载量有多少?

根据 npm 官方下载统计,@databricks-solutions/lakebase-scm-utils 在 2026/10/12 – 2026/11/10 这 30 天内被下载 4,264 次,日均约 142 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@databricks-solutions/lakebase-scm-utils 还在维护吗?

最新版本 0.3.16 发布于 2026/11/10(1 天前);至今共发布 29 个版本,其中过去 12 个月发布了 29 个;首次发布于 2026/09/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。