Merge pull request #117 from anagobabatunde/fix/SQL-unknown

refactor: update imports in waitlist API and library to ensure consistent usage of drizzle-orm functions
This commit is contained in:
iza
2025-06-26 11:25:58 +03:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
import { db } from "@opencut/db";
import { db, eq } from "@opencut/db";
import { waitlist } from "@opencut/db/schema";
import { eq } from "drizzle-orm";
import { nanoid } from "nanoid";
import { waitlistRateLimit } from "@/lib/rate-limit";
import { z } from "zod";

View File

@ -1,6 +1,5 @@
import { db } from "@opencut/db";
import { db, sql } from "@opencut/db";
import { waitlist } from "@opencut/db/schema";
import { sql } from "drizzle-orm";
export async function getWaitlistCount() {
try {

View File

@ -13,4 +13,7 @@ const client = postgres(process.env.DATABASE_URL);
export const db = drizzle(client, { schema });
// Re-export schema for convenience
export * from "./schema";
export * from "./schema";
// Re-export drizzle-orm functions to ensure version consistency
export { eq, and, or, not, isNull, isNotNull, inArray, notInArray, exists, notExists, sql } from "drizzle-orm";