feat(missions): add discord modlist hash marker field
This commit is contained in:
parent
95304d90df
commit
8d6405247e
5 changed files with 23274 additions and 1 deletions
|
|
@ -197,6 +197,15 @@ export const Missions: CollectionConfig = {
|
|||
hidden: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "discordModlistHash",
|
||||
type: "text",
|
||||
admin: {
|
||||
description:
|
||||
"Fingerprint of the attached modlist last announced to Discord (managed by the bot).",
|
||||
hidden: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "evaluationRemindersSentAt",
|
||||
type: "date",
|
||||
|
|
|
|||
23242
src/migrations/20260907_044934_add_missions_discord_modlist_hash.json
Normal file
23242
src/migrations/20260907_044934_add_missions_discord_modlist_hash.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,11 @@
|
|||
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
|
||||
|
||||
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||||
await db.execute(sql`
|
||||
ALTER TABLE "missions" ADD COLUMN "discord_modlist_hash" varchar;`)
|
||||
}
|
||||
|
||||
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||||
await db.execute(sql`
|
||||
ALTER TABLE "missions" DROP COLUMN "discord_modlist_hash";`)
|
||||
}
|
||||
|
|
@ -39,6 +39,7 @@ import * as migration_20260907_012326_add_missions_created_by from './20260907_0
|
|||
import * as migration_20260907_013724_make_missions_campaign_optional from './20260907_013724_make_missions_campaign_optional';
|
||||
import * as migration_20260907_041051_add_voice_script_spoiler from './20260907_041051_add_voice_script_spoiler';
|
||||
import * as migration_20260907_043339_add_voice_script_description from './20260907_043339_add_voice_script_description';
|
||||
import * as migration_20260907_044934_add_missions_discord_modlist_hash from './20260907_044934_add_missions_discord_modlist_hash';
|
||||
|
||||
export const migrations = [
|
||||
{
|
||||
|
|
@ -244,6 +245,11 @@ export const migrations = [
|
|||
{
|
||||
up: migration_20260907_043339_add_voice_script_description.up,
|
||||
down: migration_20260907_043339_add_voice_script_description.down,
|
||||
name: '20260907_043339_add_voice_script_description'
|
||||
name: '20260907_043339_add_voice_script_description',
|
||||
},
|
||||
{
|
||||
up: migration_20260907_044934_add_missions_discord_modlist_hash.up,
|
||||
down: migration_20260907_044934_add_missions_discord_modlist_hash.down,
|
||||
name: '20260907_044934_add_missions_discord_modlist_hash'
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2372,6 +2372,10 @@ export interface Mission {
|
|||
* When the attendance roll-call was first posted to Discord (managed by the bot).
|
||||
*/
|
||||
discordAttendanceSentAt?: string | null;
|
||||
/**
|
||||
* Fingerprint of the attached modlist last announced to Discord (managed by the bot).
|
||||
*/
|
||||
discordModlistHash?: string | null;
|
||||
/**
|
||||
* When evaluation reminder DMs were sent for this mission (managed by the bot, one-shot).
|
||||
*/
|
||||
|
|
@ -4479,6 +4483,7 @@ export interface MissionsSelect<T extends boolean = true> {
|
|||
discordMessageId?: T;
|
||||
discordAttendanceHash?: T;
|
||||
discordAttendanceSentAt?: T;
|
||||
discordModlistHash?: T;
|
||||
evaluationRemindersSentAt?: T;
|
||||
createdBy?: T;
|
||||
coverImage?: T;
|
||||
|
|
|
|||
Loading…
Reference in a new issue