Collections

Snapshot the local collections into a new migration.

Syntax

$ vela migrate collections
$ vela migrate collections --yes   # no question, for scripts

Writes a new migration holding a snapshot of every collection in your local database, as it stands now. This is how changes made by hand in the PocketBase admin interface get captured into version control.

The command asks for confirmation first, formats the file with the project’s Prettier and prints its path. If PocketBase writes no file, that is reported as an error rather than a success. vela migrate snapshot is an alias.

Options

  • -y, --yes - Skip the confirmation prompt. Off a terminal the command refuses to run without it

Review the generated file, commit it so teammates pick up the schema, and run vela migrate up on other environments to apply it.