Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): Spelling of data-migrate command #10003

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,37 +149,37 @@ yarn run v1.22.4
> [ { id: 1, email: 'tom@redwoodjs.com', 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
Expand Down
Loading