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(templates): correcting when we can patch in the templates #71

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

Jacobbrewer1
Copy link
Owner

Describe your changes

This pull request makes significant updates to the patch functionality in the codebase, including the addition of a new Patch method and the removal of the old one. The changes enhance the way patches are generated and executed in the database.

Enhancements to patch functionality:

  • templates/_update.tmpl: Removed the old Patch method, which handled patching by generating and executing SQL patches.
  • templates/model.tmpl: Added a new Patch method that includes a {{ lcfirst $struct }}IdWherer type for generating the WHERE clause based on primary key columns. This method also uses the patcher.NewDiffSQLPatch function to create SQL patches.

@Jacobbrewer1 Jacobbrewer1 merged commit 4ac55e3 into main Jan 30, 2025
5 checks passed
@Jacobbrewer1 Jacobbrewer1 deleted the fix/patching branch January 30, 2025 13:59
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.

1 participant