feat(federation): add approval_token columns to peer schema

Nullable text columns on federation_peers and peer_approval_requests.
Existing rows degrade gracefully (NULL token) per spec §5; the verification
logic landing in subsequent commits routes legacy null-token state through
the existing autoAccept gate.
This commit is contained in:
Jannis Braun
2026-04-26 11:44:06 +02:00
parent 4533e36e51
commit 2d8ecd0131
4 changed files with 3264 additions and 0 deletions
+2
View File
@@ -374,6 +374,7 @@ export const federationPeers = sqliteTable('federation_peers', {
secretRotatedAt: integer('secret_rotated_at'),
autoRotateIntervalDays: integer('auto_rotate_interval_days').notNull().default(90),
createdAt: integer('created_at').notNull(),
approvalToken: text('approval_token'),
});
export const peerApprovalRequests = sqliteTable('peer_approval_requests', {
@@ -383,6 +384,7 @@ export const peerApprovalRequests = sqliteTable('peer_approval_requests', {
hmacSecret: text('hmac_secret').notNull(),
requestedAt: integer('requested_at').notNull(),
expiresAt: integer('expires_at').notNull(),
approvalToken: text('approval_token'),
});
export const federationOutbox = sqliteTable('federation_outbox', {