2025-11-21 08:31:02 +01:00
|
|
|
import { z } from "zod";
|
2026-02-25 02:34:27 +01:00
|
|
|
import { ReferenceSchema, TransientEntitySchema } from "../entity.ts";
|
2025-04-08 16:01:10 +02:00
|
|
|
|
2026-02-25 02:34:27 +01:00
|
|
|
export const MigrationSchema = TransientEntitySchema.extend({
|
2025-04-08 16:01:10 +02:00
|
|
|
type: z.literal("pub.versia:migration/Migration"),
|
2026-02-25 02:34:27 +01:00
|
|
|
author: ReferenceSchema,
|
|
|
|
|
destination: ReferenceSchema,
|
2025-04-08 16:01:10 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const MigrationExtensionSchema = z.strictObject({
|
2026-02-25 02:34:27 +01:00
|
|
|
previous: ReferenceSchema,
|
|
|
|
|
new: ReferenceSchema.nullish(),
|
2025-04-08 16:01:10 +02:00
|
|
|
});
|