function up
up(db: DatabaseSync): void

Run once by runMigrations. Every user present gets both cadences, with a first period that ends at some hour of the coming week or month, picked from their id: the digests start trickling out after the deploy instead of all leaving a week later. Users created later are scheduled by the service when it first sees them.

Parameters

db: DatabaseSync

Return Type

void

Usage

import { up } from "api/db/migrations/0020_digest_schedule.ts";