Add verified administrator controls and upload abuse limits

This commit is contained in:
2026-10-14 20:37:55 +09:00
parent c3573b605c
commit 3786baf60c
23 changed files with 1941 additions and 22 deletions

View File

@@ -352,3 +352,19 @@ export const idempotency = sqliteTable(
check('idempotency_subject', sql`(${t.guestId} IS NOT NULL) + (${t.userId} IS NOT NULL) = 1`),
],
);
export const adminSettings = sqliteTable('admin_settings', {
name: text().primaryKey(),
value: text().notNull(),
updatedAt: integer().notNull(),
});
export const adminAudit = sqliteTable(
'admin_audit',
{
id: text().primaryKey(),
actorUserId: text().references(() => users.id, { onDelete: 'set null' }),
action: text().notNull(),
details: text().notNull(),
createdAt: integer().notNull(),
},
(t) => [index('admin_audit_created').on(t.createdAt)],
);