schema.ts 407 B

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