This commit is contained in:
parent
a12e460448
commit
636222eead
5 changed files with 26088 additions and 1 deletions
|
|
@ -165,6 +165,13 @@ export const Parish: CollectionConfig = {
|
||||||
relationTo: 'media',
|
relationTo: 'media',
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'caption',
|
||||||
|
label: {
|
||||||
|
de: 'Bildunterschrift'
|
||||||
|
},
|
||||||
|
type: 'text'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
minRows: 3,
|
minRows: 3,
|
||||||
maxRows: 12
|
maxRows: 12
|
||||||
|
|
|
||||||
26053
src/migrations/20260609_113259_parish_gallery_caption.json
Normal file
26053
src/migrations/20260609_113259_parish_gallery_caption.json
Normal file
File diff suppressed because it is too large
Load diff
19
src/migrations/20260609_113259_parish_gallery_caption.ts
Normal file
19
src/migrations/20260609_113259_parish_gallery_caption.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
|
||||||
|
|
||||||
|
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-06-14T11:32:58.445Z';
|
||||||
|
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-06-14T11:32:58.773Z';
|
||||||
|
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-07-09T11:32:58.852Z';
|
||||||
|
ALTER TABLE "parish_gallery" ADD COLUMN "caption" varchar;
|
||||||
|
ALTER TABLE "_parish_v_version_gallery" ADD COLUMN "caption" varchar;`)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||||||
|
await db.execute(sql`
|
||||||
|
ALTER TABLE "announcement" ALTER COLUMN "date" SET DEFAULT '2026-06-07T13:08:42.418Z';
|
||||||
|
ALTER TABLE "calendar" ALTER COLUMN "date" SET DEFAULT '2026-06-07T13:08:42.705Z';
|
||||||
|
ALTER TABLE "classifieds" ALTER COLUMN "until" SET DEFAULT '2026-07-05T13:08:42.759Z';
|
||||||
|
ALTER TABLE "parish_gallery" DROP COLUMN "caption";
|
||||||
|
ALTER TABLE "_parish_v_version_gallery" DROP COLUMN "caption";`)
|
||||||
|
}
|
||||||
|
|
@ -48,6 +48,7 @@ import * as migration_20260605_095112 from './20260605_095112';
|
||||||
import * as migration_20260605_113107_occurrence_end_time from './20260605_113107_occurrence_end_time';
|
import * as migration_20260605_113107_occurrence_end_time from './20260605_113107_occurrence_end_time';
|
||||||
import * as migration_20260605_124103_gallery_caption from './20260605_124103_gallery_caption';
|
import * as migration_20260605_124103_gallery_caption from './20260605_124103_gallery_caption';
|
||||||
import * as migration_20260605_130843_add_worship_language_other from './20260605_130843_add_worship_language_other';
|
import * as migration_20260605_130843_add_worship_language_other from './20260605_130843_add_worship_language_other';
|
||||||
|
import * as migration_20260609_113259_parish_gallery_caption from './20260609_113259_parish_gallery_caption';
|
||||||
|
|
||||||
export const migrations = [
|
export const migrations = [
|
||||||
{
|
{
|
||||||
|
|
@ -298,6 +299,11 @@ export const migrations = [
|
||||||
{
|
{
|
||||||
up: migration_20260605_130843_add_worship_language_other.up,
|
up: migration_20260605_130843_add_worship_language_other.up,
|
||||||
down: migration_20260605_130843_add_worship_language_other.down,
|
down: migration_20260605_130843_add_worship_language_other.down,
|
||||||
name: '20260605_130843_add_worship_language_other'
|
name: '20260605_130843_add_worship_language_other',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
up: migration_20260609_113259_parish_gallery_caption.up,
|
||||||
|
down: migration_20260609_113259_parish_gallery_caption.down,
|
||||||
|
name: '20260609_113259_parish_gallery_caption'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -317,6 +317,7 @@ export interface Parish {
|
||||||
gallery?:
|
gallery?:
|
||||||
| {
|
| {
|
||||||
photo: string | Media;
|
photo: string | Media;
|
||||||
|
caption?: string | null;
|
||||||
id?: string | null;
|
id?: string | null;
|
||||||
}[]
|
}[]
|
||||||
| null;
|
| null;
|
||||||
|
|
@ -1700,6 +1701,7 @@ export interface ParishSelect<T extends boolean = true> {
|
||||||
| T
|
| T
|
||||||
| {
|
| {
|
||||||
photo?: T;
|
photo?: T;
|
||||||
|
caption?: T;
|
||||||
id?: T;
|
id?: T;
|
||||||
};
|
};
|
||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue