Cannot specify date and time in TIMESTAMP type field with allow_commit_timestamp=true.
Spanner's SQL spec allows past dates and times to be registered for TIMESTAMP type fields with allow_commit_timestamp=true, but spanner.CommitTimestamp is set when using the code generated by yo.
In the following code, CreatedAt is expected to be updated only once
example
CREATE TABLE User (
Id STRING(MAX) NOT NULL
Name STRING(MAX) NOT NULL,
CreatedAt TIMESTAMP NOT NULL OPTIONS (
allow_commit_timestamp = true
),
UpdatedAt TIMESTAMP NOT NULL OPTIONS (
allow_commit_timestamp = true
)
) PRIMARY KEY(Id);