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

[11.x] Fix SQLite schema dumps missing most tables #52275

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

bakerkretzmar
Copy link
Contributor

@bakerkretzmar bakerkretzmar commented Jul 25, 2024

Fixes a bug I introduced in #52172 that would cause SQLite schema dumps to be mostly empty. My original regular expression was too greedy and removed almost the entire file contents. This PR adds a test to cover this case and adds the ? modifier to make the relevant part of the regex lazy, so it will consume at most one CREATE TABLE statement at a time as intended. See regexr.com/83vo9 (includes global flag but that isn't necessary for preg_replace).

Closes #52254.

@dmyers
Copy link
Contributor

dmyers commented Jul 25, 2024

Thank you @bakerkretzmar for your help. I'm closing my PR now as this one fixes my issue from my local testing of this change with my app.

@taylorotwell taylorotwell merged commit 5979519 into laravel:11.x Jul 26, 2024
31 checks passed
@bakerkretzmar bakerkretzmar deleted the fix-sqlite-schema-dumps branch July 26, 2024 17:57
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.

3 participants