astro
astro
Explore posts from servers
DTDrizzle Team
Created by astro on 7/5/2024 in #help
drizzle not showing columns
i fixed it nvm i was using a multi file schema(separate file for each table in db) just needed to create an index.ts in root of my schema folder and export all schemas
export * from "./auth";
export * from "./campaigns";
export * from "./newsletters";
export * from "./smtpServers";
export * from "./subscribers";
export * from "./auth";
export * from "./campaigns";
export * from "./newsletters";
export * from "./smtpServers";
export * from "./subscribers";
and then pass it to my db object
import { neon } from "@neondatabase/serverless";
import { drizzle } from "drizzle-orm/neon-http";
import * as schema from "./schema";

const sql = neon(process.env.DATABASE_URL!);
export const db = drizzle(sql, { schema });
import { neon } from "@neondatabase/serverless";
import { drizzle } from "drizzle-orm/neon-http";
import * as schema from "./schema";

const sql = neon(process.env.DATABASE_URL!);
export const db = drizzle(sql, { schema });
2 replies
TtRPC
Created by astro on 5/13/2024 in #❓-help
trpc + server actions
currently im creating a server folder in src with index.ts and trpc.ts and inside /api i have /trpc/[trpc]
5 replies
TtRPC
Created by astro on 5/13/2024 in #❓-help
trpc + server actions
also suggest how to setup trpc with next's app router
5 replies