Skip to content

Comments

fix: disable automatic CommitTimestamp injection in default template#187

Merged
sinmetal merged 1 commit intomasterfrom
revert-allow-commit-timestamp-tmplate
Jan 9, 2026
Merged

fix: disable automatic CommitTimestamp injection in default template#187
sinmetal merged 1 commit intomasterfrom
revert-allow-commit-timestamp-tmplate

Conversation

@sinmetal
Copy link
Collaborator

@sinmetal sinmetal commented Jan 8, 2026

Managing behavior for fields that should be set only once (e.g., CreatedAt) was difficult. Previously, the default template attempted to set spanner.CommitTimestamp every time, even for NOT NULL columns, which made it cumbersome to use.

This change delegates AllowCommitTimestamp control to Custom Templates. The default template will no longer perform any automatic timestamp operations.

refs

Managing behavior for fields that should be set only once (e.g., `CreatedAt`) was difficult.
Previously, the default template attempted to set `spanner.CommitTimestamp` every time, even for NOT NULL columns, which made it cumbersome to use.

This change delegates `AllowCommitTimestamp` control to Custom Templates. The default template will no longer perform any automatic timestamp operations.
@sinmetal sinmetal marked this pull request as ready for review January 9, 2026 04:22
@sinmetal sinmetal requested a review from vvakame January 9, 2026 04:22
Copy link
Collaborator

@vvakame vvakame left a comment

Choose a reason for hiding this comment

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

I hesitated a little, but I think I can accept it.

@sinmetal
Copy link
Collaborator Author

sinmetal commented Jan 9, 2026

@vvakame It is a breaking change, so it is a tough call, but currently it is so difficult to use that I think it is at a level where it can be considered a bug.
Therefore, although it is a difficult decision, I am thinking of releasing it in v0.7.1.
What do you think?

@vvakame
Copy link
Collaborator

vvakame commented Jan 9, 2026

how about v0.8.0?

@sinmetal
Copy link
Collaborator Author

sinmetal commented Jan 9, 2026

OK!

@sinmetal sinmetal merged commit 93ce9ca into master Jan 9, 2026
9 checks passed
@sinmetal sinmetal deleted the revert-allow-commit-timestamp-tmplate branch January 9, 2026 07:14
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