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