Skip to content

Make migrations:run output explicit about dry runs#47

Open
joeydebreuk wants to merge 1 commit into
datocms:mainfrom
joeydebreuk:improve-dry-run-output
Open

Make migrations:run output explicit about dry runs#47
joeydebreuk wants to merge 1 commit into
datocms:mainfrom
joeydebreuk:improve-dry-run-output

Conversation

@joeydebreuk

Copy link
Copy Markdown

With --dry-run, migrations:run prints the same messages as a real run:

Migrations will be run in "my-sandbox" sandbox environment
Running migration "1783541670_myMigration.ts"... done
Successfully run 1 migration scripts

This looks like the migrations were applied, while nothing happened.

After this change:

Migrations will be simulated (dry run) in "my-sandbox" sandbox environment
Simulating migration "1783541670_myMigration.ts" (dry run)... done
Successfully simulated 1 migration scripts (dry run, no changes were made)

The fork and migration-model spinners get a (dry run, skipped) suffix for the same reason. No behavior changes, only log output.

With --dry-run, the fork, model creation and migration steps log the
same messages as a real run, so it looks like changes were applied.
Mark each message with the dry-run state instead.
@roger-datocms

Copy link
Copy Markdown
Member

Good idea, thanks! I'll pass this along to the devs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants