mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-14 01:59:05 +03:00
feat: add schema for migrations
This commit is contained in:
Vendored
+14
@@ -725,4 +725,18 @@ export const DatabaseSchemas: Record<
|
||||
playtype: isValidPlaytype,
|
||||
milestones: ["string"],
|
||||
}),
|
||||
migrations: prSchemaify({
|
||||
migrationID: "string",
|
||||
status: p.isIn("applied", "pending"),
|
||||
appliedOn: (self, parent) => {
|
||||
if (parent.status === "pending") {
|
||||
return (
|
||||
self === undefined ||
|
||||
`Expected appliedOn to be undefined since status was pending.`
|
||||
);
|
||||
}
|
||||
|
||||
return p.isPositiveInteger(self);
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user