0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00
astro/packages/actions/test/fixtures/basics/db/config.ts
2024-04-23 14:28:12 -04:00

21 lines
390 B
TypeScript

import { column, defineDb, defineTable } from "astro:db";
const Comment = defineTable({
columns: {
postId: column.text(),
author: column.text(),
body: column.text(),
},
});
const Likes = defineTable({
columns: {
postId: column.text(),
likes: column.number(),
},
});
// https://astro.build/db/config
export default defineDb({
tables: { Comment, Likes },
});