Skip to content

Commit

Permalink
mod defaultIsUuid7()
Browse files Browse the repository at this point in the history
  • Loading branch information
koyopro committed Dec 15, 2024
1 parent 8ced350 commit 8b1f62a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/accel-record-core/src/model/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ export class Field {
* @returns True if the default value is "uuid7", false otherwise.
*/
get defaultIsUuid7() {
return this.default != undefined && this.default.name === "uuid(7)";
if (!this.default) return false;
if (this.default.name === "uuid(7)") return true;
return this.default.name === "uuid" && this.default.args[0] == 7;
}

/**
Expand Down

0 comments on commit 8b1f62a

Please sign in to comment.