schema.ts11 lines · main
| 1 | import { boolean, schema, table, text, timestamp } from '@briven/cli/schema'; |
| 2 | |
| 3 | export default schema({ |
| 4 | todos: table({ |
| 5 | id: text().primaryKey(), |
| 6 | body: text().notNull(), |
| 7 | done: boolean().default(false).notNull(), |
| 8 | createdAt: timestamp().default('now()').notNull(), |
| 9 | completedAt: timestamp().nullable(), |
| 10 | }), |
| 11 | }); |