Save

Save the data currently in the database as seed files.

Syntax

$ vela seeds save

This writes the current records to the data/seeds directory. The order of files is determined by the database schema — a collection is saved after every collection its relations point at, so the files load back in a workable order.

Everything in the local database is saved except fixtures, which are recognised by their vela id prefix, and view collections. For an auth collection the email and its verified state are kept; passwords are never written, and vela seeds load gives such an account a random one.

Read through the files before committing them. vela deploy loads seeds into every copy of the app, so a test account or a stray record saved here ends up in production.

Options

  • -f, --force - Overwrite existing seed files

Without --force, existing seed files are left alone rather than replaced.