schema.ts13 lines · main
1import { bigint, schema, table, text } from '@briven/cli/schema';
2
3/**
4 * Single-row counter — the minimum-viable briven app. One table with
5 * one row, no foreign keys, no indexes. Increment runs in a single
6 * UPDATE; every subscriber sees the new count via LISTEN/NOTIFY.
7 */
8export default schema({
9 counters: table({
10 id: text().primaryKey(),
11 count: bigint().default(0n).notNull(),
12 }),
13});