Skip to content

[13.x] Add without-migration-data flag to DumpCommand#60570

Open
jackbayliss wants to merge 3 commits into
laravel:13.xfrom
jackbayliss:13.x-add-without-migrations-to-dum-schema
Open

[13.x] Add without-migration-data flag to DumpCommand#60570
jackbayliss wants to merge 3 commits into
laravel:13.xfrom
jackbayliss:13.x-add-without-migrations-to-dum-schema

Conversation

@jackbayliss

@jackbayliss jackbayliss commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR adds a --without-migration-data flag to schema:dump that skips appending the migration rows, so the dump becomes pure structure.

ie...

artisan schema:dump --without-migration-data

We use this the dump command a lot internally for dumping the schema for our tests (as the docs suggest), as well as various commands for our feature flags etc to ensure the schema is always updated when something is released.

At the moment we end up truncating the migration table using DB before we call dump to ensure its not appended, which feels less magic / painful.

it would be nice to just have the ability to opt out hence the PR which I've tried to keep dead simple but you may see a nicer way? 😎

@github-actions

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@jackbayliss jackbayliss marked this pull request as ready for review June 22, 2026 15:38
@jackbayliss jackbayliss changed the title [13.x] Add without-migration-data to DumpCommand [13.x] Add without-migration-data flag to DumpCommand Jun 22, 2026
@shaedrich

shaedrich commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What about --schema-only or --ddl-only?

@jackbayliss

jackbayliss commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@shaedrich Any work for me tbh, depends on Taylor what he prefers 😄 as long as I can opt out is the main thing :)

Thanks!

@jackbayliss jackbayliss marked this pull request as draft June 22, 2026 23:21
@jackbayliss jackbayliss marked this pull request as ready for review June 22, 2026 23:29
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