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:
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE `federation_peers` ADD `approval_token` text;--> statement-breakpoint
|
||||||
|
ALTER TABLE `peer_approval_requests` ADD `approval_token` text;
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,13 @@
|
|||||||
"when": 1777144927946,
|
"when": 1777144927946,
|
||||||
"tag": "0001_complex_screwball",
|
"tag": "0001_complex_screwball",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 2,
|
||||||
|
"version": "6",
|
||||||
|
"when": 1777196627239,
|
||||||
|
"tag": "0002_peer_approval_token",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -374,6 +374,7 @@ export const federationPeers = sqliteTable('federation_peers', {
|
|||||||
secretRotatedAt: integer('secret_rotated_at'),
|
secretRotatedAt: integer('secret_rotated_at'),
|
||||||
autoRotateIntervalDays: integer('auto_rotate_interval_days').notNull().default(90),
|
autoRotateIntervalDays: integer('auto_rotate_interval_days').notNull().default(90),
|
||||||
createdAt: integer('created_at').notNull(),
|
createdAt: integer('created_at').notNull(),
|
||||||
|
approvalToken: text('approval_token'),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const peerApprovalRequests = sqliteTable('peer_approval_requests', {
|
export const peerApprovalRequests = sqliteTable('peer_approval_requests', {
|
||||||
@@ -383,6 +384,7 @@ export const peerApprovalRequests = sqliteTable('peer_approval_requests', {
|
|||||||
hmacSecret: text('hmac_secret').notNull(),
|
hmacSecret: text('hmac_secret').notNull(),
|
||||||
requestedAt: integer('requested_at').notNull(),
|
requestedAt: integer('requested_at').notNull(),
|
||||||
expiresAt: integer('expires_at').notNull(),
|
expiresAt: integer('expires_at').notNull(),
|
||||||
|
approvalToken: text('approval_token'),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const federationOutbox = sqliteTable('federation_outbox', {
|
export const federationOutbox = sqliteTable('federation_outbox', {
|
||||||
|
|||||||
Reference in New Issue
Block a user