Files
Memento/db/config.ts
2026-01-12 11:50:33 +13:00

19 lines
396 B
TypeScript

import { defineDb, column, defineTable, NOW } from 'astro:db';
const Entry = defineTable({
columns: {
id: column.number({ primaryKey: true }),
date: column.date({ default: NOW }),
location: column.json(),
content: column.json({ default: {} })
},
indexes: [
{ on: ['date', 'content'] }
]
})
// https://astro.build/db/config
export default defineDb({
tables: {}
});