storage:migrate

Introduction

storage:migrate moves each feature’s files into the feature’s own folder of the product’s storage. A feature names the places its files may be with register_storage_move in its init_feature, and this command empties them. The product’s start runs it after the database migrations, so you rarely type it yourself.

splent storage:migrate
  notes            12 from /workspace/my_app/instance/protected_uploads/notes
  storage /workspace/my_app/storage: 12 moved.

Seeing what would move

splent storage:migrate --dry-run

It prints the same lines, ending in would move, and moves nothing.


Running it twice

What moved is gone from the old place, so a second run finds nothing and prints only the closing line.

A file that is already in the feature’s folder stays where it is and is never overwritten. That feature’s line ends with , N already in its folder.


Reference

Option Description
--dry-run Say what would move, and move nothing

Requirements

  • A selected product (SPLENT_APP). The command builds the product’s app to learn where each feature’s files are.

See also

  • Storage, declaring where a feature’s files were.
  • db:upgrade, which the product’s start runs just before.

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es