mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
15 lines
322 B
TypeScript
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!",
|
|
});
|
|
}
|