fix: build errors and merging projects and homepage
This commit is contained in:
14
src/lib/server/db/seed.ts
Executable file
14
src/lib/server/db/seed.ts
Executable file
@@ -0,0 +1,14 @@
|
||||
import { topics } from './schema';
|
||||
import * as schema from './schema';
|
||||
import { drizzle } from 'drizzle-orm/postgres-js';
|
||||
import postgres from 'postgres';
|
||||
|
||||
const client = postgres('postgresql://postgres:postgres@localhost:5432/db');
|
||||
const db = drizzle(client, { schema });
|
||||
|
||||
await db.insert(topics).values([
|
||||
{ name: 'Math', emoji: '👍' },
|
||||
{ name: 'Programming', emoji: '👍' }
|
||||
]);
|
||||
|
||||
process.exit(0);
|
||||
Reference in New Issue
Block a user