diff --git a/docs/docs/cli-commands.md b/docs/docs/cli-commands.md index a15d643362e4..c0c7d51cc532 100644 --- a/docs/docs/cli-commands.md +++ b/docs/docs/cli-commands.md @@ -149,12 +149,12 @@ yarn run v1.22.4 > [ { id: 1, email: 'tom@redwoodjs.com', name: 'Tom' } ] ``` -## dataMigrate +## data-migrate Data migration tools. -``` -yarn redwood dataMigrate +```bash +yarn redwood data-migrate ``` | Command | Description | @@ -162,24 +162,24 @@ yarn redwood dataMigrate | `install` | Appends `DataMigration` model to `schema.prisma`, creates `api/db/dataMigrations` directory | | `up` | Executes outstanding data migrations | -### dataMigrate install +### data-migrate install - Appends a `DataMigration` model to `schema.prisma` for tracking which data migrations have already run. - Creates a DB migration using `yarn redwood prisma migrate dev --create-only create_data_migrations`. - Creates `api/db/dataMigrations` directory to contain data migration scripts ```bash -yarn redwood dataMigrate install +yarn redwood data-migrate install ``` -### dataMigrate up +### data-migrate up Executes outstanding data migrations against the database. Compares the list of files in `api/db/dataMigrations` to the records in the `DataMigration` table in the database and executes any files not present. If an error occurs during script execution, any remaining scripts are skipped and console output will let you know the error and how many subsequent scripts were skipped. ```bash -yarn redwood dataMigrate up +yarn redwood data-migrate up ``` ## dev