19 lines
396 B
TypeScript
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: {}
|
|
});
|