mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
16 lines
393 B
TypeScript
16 lines
393 B
TypeScript
|
|
import { z } from "zod";
|
||
|
|
import { url } from "../common.ts";
|
||
|
|
import { EntitySchema } from "../entity.ts";
|
||
|
|
|
||
|
|
export const MigrationSchema = EntitySchema.extend({
|
||
|
|
type: z.literal("pub.versia:migration/Migration"),
|
||
|
|
uri: z.null().optional(),
|
||
|
|
author: url,
|
||
|
|
destination: url,
|
||
|
|
});
|
||
|
|
|
||
|
|
export const MigrationExtensionSchema = z.strictObject({
|
||
|
|
previous: url,
|
||
|
|
new: url.nullish(),
|
||
|
|
});
|