Add verified administrator controls and upload abuse limits
This commit is contained in:
@@ -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)],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user