Table: federation_peers
Ce contenu n’est pas encore disponible dans votre langue.
Connected to
Section titled “Connected to”Referenced by:
comments: columnpeer_idfederation_inbox: columnpeer_idfederation_outbox: columnpeer_idfederation_peer_suggestions: columnsource_peer_idfederation_remote_actors: columnpeer_idfederation_shares: columnpeer_idlikes: columnpeer_id
Columns
Section titled “Columns”| Column | Type | Nullable | Notes |
|---|---|---|---|
id | uuid | no | Default gen_random_uuid() |
instance_url | text | no | - |
display_name | text | no | - |
instance_public_key | text | no | - |
trust_tier | text | no | Default 'connected'::text |
encryption_policy | text | no | Default 'plaintext'::text |
enabled | boolean | no | Default true |
status | text | no | Default 'connected'::text |
handshake_at | timestamp | no | Default now() |
handshake_by_user_ref | bigint | no | - |
last_seen_at | timestamp | yes | - |
notes | text | no | Default ''::text |
share_in_visible_list | boolean | no | Default false |
created_at | timestamp | no | Default now() |
updated_at | timestamp | no | Default now() |
capabilities | jsonb | no | Default '[]'::jsonb. Capabilities both instances support: the intersection agreed when they paired, as a JSON array of capability strings. Unknown strings are allowed; code acts only on the ones it knows (ADR 0049). A listed capability records what was negotiated, not proof that the feature works end to end (#1526). |
capabilities_negotiated_at | timestamp | yes | When the pairing handshake completed with a capability exchange. NULL means the peer was paired before capabilities were negotiated and should be re-paired. An empty array with a timestamp means negotiation happened and found nothing in common. |
Constraints
Section titled “Constraints”CONSTRAINT federation_peers_encryption_policy_check CHECK ((encryption_policy = ANY (ARRAY['plaintext'::text, 'e2e-encrypted'::text])))CONSTRAINT federation_peers_status_check CHECK ((status = ANY (ARRAY['pending_outbound'::text, 'pending_inbound'::text, 'connected'::text])))CONSTRAINT federation_peers_trust_tier_check CHECK ((trust_tier = ANY (ARRAY['connected'::text, 'directory-listed'::text, 'auto-sync'::text])))
Full DDL
Section titled “Full DDL”This is the table’s CREATE TABLE statement. Constraints added with separate ALTER TABLE statements, including foreign-key ON DELETE rules, and indexes are defined elsewhere in the dump; see the complete app/schema.sql.
CREATE TABLE public.federation_peers ( id uuid DEFAULT gen_random_uuid() NOT NULL, instance_url text NOT NULL, display_name text NOT NULL, instance_public_key text NOT NULL, trust_tier text DEFAULT 'connected'::text NOT NULL, encryption_policy text DEFAULT 'plaintext'::text NOT NULL, enabled boolean DEFAULT true NOT NULL, status text DEFAULT 'connected'::text NOT NULL, handshake_at timestamp with time zone DEFAULT now() NOT NULL, handshake_by_user_ref bigint NOT NULL, last_seen_at timestamp with time zone, notes text DEFAULT ''::text NOT NULL, share_in_visible_list boolean DEFAULT false NOT NULL, created_at timestamp with time zone DEFAULT now() NOT NULL, updated_at timestamp with time zone DEFAULT now() NOT NULL, capabilities jsonb DEFAULT '[]'::jsonb NOT NULL, capabilities_negotiated_at timestamp with time zone, CONSTRAINT federation_peers_encryption_policy_check CHECK ((encryption_policy = ANY (ARRAY['plaintext'::text, 'e2e-encrypted'::text]))), CONSTRAINT federation_peers_status_check CHECK ((status = ANY (ARRAY['pending_outbound'::text, 'pending_inbound'::text, 'connected'::text]))), CONSTRAINT federation_peers_trust_tier_check CHECK ((trust_tier = ANY (ARRAY['connected'::text, 'directory-listed'::text, 'auto-sync'::text]))));See the schema overview for context.