error with neon and drizzle

migrate.ts
import { drizzle } from "drizzle-orm/neon-http";
import {migrate } from "drizzle-orm/neon-http/migrator";
import { neon } from "@neondatabase/serverless";
const sql = neon (process.env.DATABASE_URL as string);
const db = drizzle(sql);
const main= async () => {
try {
await migrate(db,{
migrationsFolder:"./migrations",
});
console.log("success!")
} catch (error) {
console.log(error)
}

}
main();
migrate.ts
import { drizzle } from "drizzle-orm/neon-http";
import {migrate } from "drizzle-orm/neon-http/migrator";
import { neon } from "@neondatabase/serverless";
const sql = neon (process.env.DATABASE_URL as string);
const db = drizzle(sql);
const main= async () => {
try {
await migrate(db,{
migrationsFolder:"./migrations",
});
console.log("success!")
} catch (error) {
console.log(error)
}

}
main();
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server