chore: add media migration scripts, migrate media.
This commit is contained in:
@@ -112,10 +112,12 @@ export interface Config {
|
||||
globals: {
|
||||
header: Header;
|
||||
footer: Footer;
|
||||
'spa-media': SpaMedia;
|
||||
};
|
||||
globalsSelect: {
|
||||
header: HeaderSelect<false> | HeaderSelect<true>;
|
||||
footer: FooterSelect<false> | FooterSelect<true>;
|
||||
'spa-media': SpaMediaSelect<false> | SpaMediaSelect<true>;
|
||||
};
|
||||
locale: null;
|
||||
widgets: {
|
||||
@@ -1756,6 +1758,27 @@ export interface Footer {
|
||||
updatedAt?: string | null;
|
||||
createdAt?: string | null;
|
||||
}
|
||||
/**
|
||||
* Central media map for legacy /spa images and videos. The migration script stores each original URL/path here and points it to a Payload media entry.
|
||||
*
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "spa-media".
|
||||
*/
|
||||
export interface SpaMedia {
|
||||
id: number;
|
||||
assets?:
|
||||
| {
|
||||
/**
|
||||
* Original /spa image/video path or external URL, e.g. /images/gala-dinner.jpg.
|
||||
*/
|
||||
source: string;
|
||||
media: number | Media;
|
||||
id?: string | null;
|
||||
}[]
|
||||
| null;
|
||||
updatedAt?: string | null;
|
||||
createdAt?: string | null;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "header_select".
|
||||
@@ -1874,6 +1897,22 @@ export interface FooterSelect<T extends boolean = true> {
|
||||
createdAt?: T;
|
||||
globalType?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "spa-media_select".
|
||||
*/
|
||||
export interface SpaMediaSelect<T extends boolean = true> {
|
||||
assets?:
|
||||
| T
|
||||
| {
|
||||
source?: T;
|
||||
media?: T;
|
||||
id?: T;
|
||||
};
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
globalType?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "collections_widget".
|
||||
|
||||
Reference in New Issue
Block a user