Skip to content

Conversation

@shyim
Copy link
Member

@shyim shyim commented Jan 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 8, 2026 10:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #799 by adding logic to wrap old bare faker expressions (e.g., faker.Internet().Email()) with the required delimiters ({{- -}}) before evaluation. This ensures backward compatibility with database values that were stored before the delimiter requirement was introduced.

Key changes:

  • Added wrapping logic for bare faker expressions in the data dumping process
  • Added a test case to validate faker expression evaluation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
internal/mysqldump/mysql.go Added conditional logic to detect and wrap bare faker expressions with delimiters before processing
internal/mysqldump/faker_test.go Added test case for validating faker expression evaluation (though it doesn't test the new wrapping logic directly)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shyim shyim force-pushed the fix/faker branch 2 times, most recently from 117fc89 to e476a7d Compare January 8, 2026 10:55
Normalize faker expressions at config level by wrapping bare expressions
like "faker.Internet.Email()" with {{- -}} delimiters before they're
used in the dump process. This approach handles the normalization in one
place (NormalizeFakerExpressions) rather than at runtime.

- Add NormalizeFakerExpressions method to ConfigDump
- Call normalization after reading config in project_dump.go
- Add comprehensive tests for the new normalization logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@shyim shyim merged commit 4910126 into main Jan 8, 2026
3 checks passed
@shyim shyim deleted the fix/faker branch January 8, 2026 12:12
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