Files
llink/go/migrations/000016_push_tokens.up.sql
T
Arjun PatelandGitHub d262f734f0 Mobile notifications for iOS (#210)
* mobile: wire notification registration and listener

* implement backend components for push notifications

* refactor: agentic comment cleanup

* docs: use proper module name for particle processor

* set required env variables for push notifications

* bump version

* fix: always upsert push token on mobile start

* Revert "fix: always upsert push token on mobile start"

This reverts commit 90ff18a788.

* send push notifications regardless of online status
2026-05-18 12:44:31 -07:00

11 lines
402 B
SQL

CREATE TABLE push_tokens (
token TEXT PRIMARY KEY,
human_id TEXT NOT NULL REFERENCES humans(id) ON DELETE CASCADE,
platform TEXT NOT NULL CHECK (platform IN ('ios', 'android')),
app_version TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
last_seen_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX push_tokens_human_id_idx ON push_tokens (human_id);