Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config/database.js

    r0091cb7 r640b39c  
    4747  // Per-site Prutter toggle: when off, DM endpoints/UI are hidden for that site.
    4848  ensureColumn('sites', 'enable_prutter', 'INTEGER DEFAULT 1');
    49   // Cirkels: mag deze site in cirkels van anderen verschijnen (surfacing opt-out).
    50   ensureColumn('sites', 'allow_circle', 'INTEGER DEFAULT 1');
    5149
    5250  // v9 audit additions —————————————————————————————————————————
     
    108106  `);
    109107  db.prepare("INSERT OR IGNORE INTO app_settings (key, value) VALUES ('tenancy', 'solo')").run();
    110 
    111   // ── Cirkels (federatie) ─────────────────────────────────────
    112   // Decentrale, asymmetrische verbindingen tussen solo-instances.
    113   db.exec(`
    114     CREATE TABLE IF NOT EXISTS circle_links (
    115       id TEXT PRIMARY KEY,
    116       local_site_id TEXT NOT NULL,
    117       remote_url TEXT NOT NULL,
    118       remote_actor_id TEXT,
    119       label TEXT,
    120       status TEXT DEFAULT 'active',
    121       added_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    122       last_synced DATETIME,
    123       last_error TEXT,
    124       UNIQUE(local_site_id, remote_url),
    125       FOREIGN KEY (local_site_id) REFERENCES sites(id)
    126     );
    127     CREATE TABLE IF NOT EXISTS remote_actors (
    128       id TEXT PRIMARY KEY,
    129       url TEXT UNIQUE NOT NULL,
    130       name TEXT,
    131       summary TEXT,
    132       avatar TEXT,
    133       public_key TEXT NOT NULL,
    134       fetched_at DATETIME DEFAULT CURRENT_TIMESTAMP
    135     );
    136     CREATE TABLE IF NOT EXISTS remote_posts (
    137       id TEXT PRIMARY KEY,
    138       actor_id TEXT NOT NULL,
    139       published DATETIME,
    140       title TEXT,
    141       summary TEXT,
    142       url TEXT,
    143       media_json TEXT,
    144       raw_json TEXT,
    145       fetched_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    146       FOREIGN KEY (actor_id) REFERENCES remote_actors(id)
    147     );
    148   `);
    149108}
    150109
Note: See TracChangeset for help on using the changeset viewer.