function up
up(db: DatabaseSync): void

Run once by runMigrations. Existing users start with every message read, instead of the whole history unread. A user created later starts with a NULL chat_read_at, which chat-service reads as the user's creation time.

Parameters

db: DatabaseSync

Return Type

void

Usage

import { up } from "api/db/migrations/0014_chat_read_state.ts";