-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): Spelling of
data-migrate
command (#10003)
- Loading branch information
1 parent
fa2887c
commit 6132ed5
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,37 +149,37 @@ yarn run v1.22.4 | |
> [ { id: 1, email: '[email protected]', name: 'Tom' } ] | ||
``` | ||
## dataMigrate | ||
## data-migrate | ||
Data migration tools. | ||
``` | ||
yarn redwood dataMigrate <command> | ||
```bash | ||
yarn redwood data-migrate <command> | ||
``` | ||
| Command | Description | | ||
| :-------- | :------------------------------------------------------------------------------------------ | | ||
| `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 | ||
|