SKILL

pb-migrations

PocketBase 的模式迁移与版本管理。适用于创建迁移、管理模式版本、在环境之间同步集合、使用 automigrate 或以编程方式创建集合。涵盖 migrate 命令、迁移文件格式、快照导入以及 _migrations 跟踪表。

机器翻译
查看英文原文

Schema migrations and versioning for PocketBase. Use when creating migrations, managing schema versions, syncing collections between environments, using automigrate, or creating collections programmatically. Covers migrate commands, migration file format, snapshot imports, and the _migrations tracking table.

适用对象:对象待分类。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • PocketBase Migrations & Schema Versioning
  • Overview
  • CLI Commands
  • Auto-migrate Mode
  • Migration File Format
  • Creating Collections Programmatically
  • Base collection
  • Auth collection

PocketBase supports two approaches to schema management: 1. Auto-migrate (default in dev) — Dashboard changes auto-generate migration files in pbmigrations/ 2. Manual migrations — write migration files by hand for full control Enabled by default. When you change collections in the Dashboard, PocketBase auto-generates migration files in pbmigrations/. Workflow: 1. Develop with auto-migrate ON — use Dashboard to design schema 2. Migration files are auto-generated in pbmigrations/ 3. Commit these files to git 4. Deploy: migrations run automatically on serve start 5. In production: use --automigrate=0 to prevent Dashboard changes from generating new migrations Important: the app inside migrations is a transactional instance. If any error occurs, the entire migration is rolled back. Warning: raw SQL bypasses PocketBase's schema cache. Run migrate collections afterward to re-sync if needed. ./pocketbase migrate collections generates a complete snapshot — useful for: Bootstrapping a new environment Resetting migration history Reviewing full schema in one file The generated file uses app.importCollections(collections) which supports two modes: Default (merge/extend): adds new collections a

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
davila7/claude-code-templates
源文件
cli-tool/components/skills/pocketbase/pb-migrations/SKILL.md
固定版本
21be197f100a12b8d0dd9a211cc244c8179f84d3
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:39.588Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。