Skip to content

Commit

Permalink
fix: use version for info collection
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Nov 8, 2024
1 parent 1bfb90d commit a79040d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async function processCollectionItems(nuxt: Nuxt, collections: ResolvedCollectio
collectionDump[collection.name]!.push(
generateCollectionTableDefinition(infoCollection, { drop: false }),
`DELETE FROM ${infoCollection.tableName} WHERE id = 'checksum_${collection.name}'`,
generateCollectionInsert(infoCollection, { id: `checksum_${collection.name}`, value: collectionChecksum[collection.name] }),
generateCollectionInsert(infoCollection, { id: `checksum_${collection.name}`, version: collectionChecksum[collection.name] }),
)
}

Expand Down
4 changes: 2 additions & 2 deletions src/utils/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ export function resolveCollections(collections: Record<string, DefinedCollection
source: undefined,
schema: z.object({
id: z.string(),
value: z.string(),
version: z.string(),
}),
extendedSchema: z.object({
id: z.string(),
value: z.string(),
version: z.string(),
}),
jsonFields: [],
}
Expand Down

0 comments on commit a79040d

Please sign in to comment.