T-HUB/apps/api/migrations
hacklab ad0f1be6cf feat: outreach contacts — track hand-written DMs per collective
A list of public accounts a collective wants to write to (artists,
collectives, public figures), with a drafted message per contact and the
state of the conversation: todo, sent, replied, declined.

The Hub does not send these messages. "Copy & open profile" puts the
draft on the clipboard and opens the profile; a person sends it from the
platform's own DM box and marks it sent. Unsolicited bulk DMs break the
terms of every commercial platform and get accounts restricted, and
Instagram's API cannot open a conversation at all.

API (OutreachModule):
- migration 041: outreach_contacts, RLS enabled + forced with WITH CHECK,
  unique per (workspace, platform, lower(handle)); permissions
  outreach.view (Owner/Admin/Editor/Moderator) and outreach.manage
  (Owner/Admin/Editor).
- GET/POST/PATCH/DELETE /outreach/contacts; bulk import up to 500 rows,
  known accounts skipped. Audit records list changes and status moves,
  never the message text.

Web: /outreach page (sidebar + More), CSV import, {name}/{handle}
template for pending contacts, status filters, a daily counter that
warns past 20 first messages.

Tests: service and request parsing with the DB faked; the migration and
every service query were also run against PGlite as the non-superuser
app role (tenant isolation, conflict skip, status timestamps).
2026-10-15 14:15:03 +02:00
..
001_tenants.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
002_rbac_seed.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
003_app_role.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
004_policy_nullif.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
005_epoch_fix.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
006_publishing.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
007_auth.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
008_groups.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
009_video.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
010_audit_hash_v2.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
012_live_sources.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
013_production.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
014_live_chat.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
015_archive.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
016_username_auth.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
017_invite_links.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
018_publishing_execution.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
019_publishing_integration.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
020_analytics.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
021_stream_columns.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
022_live_destinations.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
023_virtual_channel_import.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
024_chatgov.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
025_archive_search.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
025_chatgov_p2.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
026_columns_p1.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
027_intake.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
028_instance_settings.sql Tactical Media Broadcast Hub — initial release 2026-10-10 11:56:42 +00:00
029_group_files.sql Integrate group files: nullable room for uploads, archive class, claim idempotency, upload route 2026-10-11 10:09:24 +00:00
030_collectives.sql Collectives P1: participation landing (ES/EN), group tree, room provisioning APIs 2026-10-12 13:53:40 +00:00
031_personal_workspaces.sql P1 flow fix: register makes a solo user by default, collective creation is an opt-in flag, post-login menu for collective-less accounts 2026-10-12 16:19:08 +00:00
032_room_id_bare_form.sql 032: accept bare room IDs (tuwunel 1.9.4 mints and serves them without :server) 2026-10-12 23:10:59 +00:00
033_publish_governance.sql feat: per-connection publish governance — auto, 1-admin, majority, consensus 2026-10-14 08:04:56 +00:00
034_auth_sessions_oidc_refresh.sql feat: OIDC phase 2 — session-bound refresh tokens, server-side logout 2026-10-14 11:33:47 +00:00
035_submissions.sql feat: anonymous group submission boxes — public intake, CC licence, moderation 2026-10-14 13:32:00 +00:00
036_branding.sql feat: POST /auth/workspaces — create an additional collective from an existing account 2026-10-14 17:16:17 +00:00
037_chat_display.sql feat: POST /auth/workspaces — create an additional collective from an existing account 2026-10-14 17:16:17 +00:00
038_media_assets.sql feat: media attachments backend + producer job intake (t1+t3) 2026-10-14 20:00:31 +00:00
039_producer.sql feat: media attachments backend + producer job intake (t1+t3) 2026-10-14 20:00:31 +00:00
040_produce_claim.sql fix: produce worker claim — SECURITY DEFINER fn fixes 08P01 poll crash + stale-lease reclaim (040) 2026-10-14 21:55:41 +00:00
041_outreach.sql feat: outreach contacts — track hand-written DMs per collective 2026-10-15 14:15:03 +02:00