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

15 lines
322 B
TypeScript

import { db, Likes, Comment } from "astro:db";
// https://astro.build/db/seed
export default async function seed() {
await db.insert(Likes).values({
postId: "first-post.md",
likes: 10,
});
await db.insert(Comment).values({
postId: "first-post.md",
author: "Alice",
body: "Great post!",
});
}