Skip to content

Commit

Permalink
fix: re-add updatedAt
Browse files Browse the repository at this point in the history
  • Loading branch information
dzehnder committed Jan 6, 2025
1 parent 13ea1e6 commit c6cd3b3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class SchemaBuilder {
}

/**
* By default, createdAt is readOnly. This method allows
* By default createdAt and updatedAt are readOnly. This method allows
* to disable this behavior and allow upserts.
*
* @param {boolean} allow - Whether to allow upserts.
Expand All @@ -227,6 +227,11 @@ class SchemaBuilder {
required: true,
default: () => new Date().toISOString(),
});
this.addAttribute('updatedAt', {
type: 'string',
required: true,
default: () => new Date().toISOString(),
});
}

return this;
Expand Down

0 comments on commit c6cd3b3

Please sign in to comment.