Skip to content

Commit

Permalink
refactor(constants): remove updated/created fields from baserecords
Browse files Browse the repository at this point in the history
PocketBase no longer adds those fields by default.
  • Loading branch information
skowrons committed Nov 15, 2024
1 parent 861e12f commit 3a88139
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export type ${HTML_STRING_NAME} = string`
export const BASE_SYSTEM_FIELDS_DEFINITION = `// System fields
export type BaseSystemFields<T = never> = {
\tid: ${RECORD_ID_STRING_NAME}
\tcreated: ${DATE_STRING_TYPE_NAME}
\tupdated: ${DATE_STRING_TYPE_NAME}
\tcollectionId: string
\tcollectionName: Collections
\texpand?: T
Expand Down
2 changes: 0 additions & 2 deletions test/__snapshots__/fromJSON.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export type HTMLString = string
// System fields
export type BaseSystemFields<T = never> = {
id: RecordIdString
created: IsoDateString
updated: IsoDateString
collectionId: string
collectionName: Collections
expand?: T
Expand Down
2 changes: 0 additions & 2 deletions test/__snapshots__/lib.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export type HTMLString = string
// System fields
export type BaseSystemFields<T = never> = {
id: RecordIdString
created: IsoDateString
updated: IsoDateString
collectionId: string
collectionName: Collections
expand?: T
Expand Down
2 changes: 0 additions & 2 deletions test/pocketbase-types-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export type HTMLString = string
// System fields
export type BaseSystemFields<T = never> = {
id: RecordIdString
created: IsoDateString
updated: IsoDateString
collectionId: string
collectionName: Collections
expand?: T
Expand Down

0 comments on commit 3a88139

Please sign in to comment.