Releases with what's new, notices to churches, withdrawn update requests
- Releases page: each Cross Events version with notes and an urgent flag; the newest is the latest version (moved off Settings; the old setting becomes the first release). Installs get the notes for every newer version. - Notices page: a banner for site admins and supervisors (with a time window), an email to the customer and admin contact, or both; for every install or chosen ones. - POST /api/installs/update-request/cancel resolves the request and emails Joshua. - Protocol doc: releases and notices in the heartbeat/register replies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -147,3 +147,46 @@ model Setting {
|
||||
key String @id
|
||||
value String
|
||||
}
|
||||
|
||||
// A Cross Events version and what's new in it, shown to installs on an older version so the church
|
||||
// can decide whether to ask for the update. The highest version is the latest (kept in the
|
||||
// latest_version setting). Urgent releases (security or serious bug fixes) can't be put off.
|
||||
model Release {
|
||||
id String @id @default(uuid())
|
||||
version String @unique
|
||||
// Plain text; lines starting with "- " show as a list.
|
||||
notes String @default("")
|
||||
urgent Boolean @default(false)
|
||||
releasedAt DateTime @default(now())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
enum NoticeLevel {
|
||||
info
|
||||
maintenance
|
||||
warning
|
||||
}
|
||||
|
||||
// A message from Joshua to churches: a banner on their site for site admins and supervisors
|
||||
// (between startsAt and endsAt), an email to the customer and the install's admin contact, or both.
|
||||
model Notice {
|
||||
id String @id @default(uuid())
|
||||
title String
|
||||
message String
|
||||
level NoticeLevel @default(info)
|
||||
// Every install, or only the ones listed.
|
||||
allInstalls Boolean @default(true)
|
||||
installIds String[] @default([])
|
||||
showBanner Boolean @default(true)
|
||||
// Null = straight away / until ended.
|
||||
startsAt DateTime?
|
||||
endsAt DateTime?
|
||||
// Set when the email went out (sent once, when the notice is created).
|
||||
emailedAt DateTime?
|
||||
emailedTo Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([endsAt])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user