schema.ts13 lines · main
| 1 | import { 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 | */ |
| 8 | export default schema({ |
| 9 | counters: table({ |
| 10 | id: text().primaryKey(), |
| 11 | count: bigint().default(0n).notNull(), |
| 12 | }), |
| 13 | }); |