use bun sql instead of postgres.js
This commit is contained in:
@@ -5,16 +5,14 @@
|
||||
* Usage: bun scripts/backfill-personal-team-names.ts
|
||||
*/
|
||||
|
||||
import { drizzle } from 'drizzle-orm/postgres-js';
|
||||
import postgres from 'postgres';
|
||||
import { eq, and } from 'drizzle-orm';
|
||||
import { pgTable, text, uuid, boolean, timestamp } from 'drizzle-orm/pg-core';
|
||||
import { drizzle } from 'drizzle-orm/bun-sql';
|
||||
import { eq } from 'drizzle-orm';
|
||||
import { pgTable, text, uuid, boolean } from 'drizzle-orm/pg-core';
|
||||
|
||||
const DATABASE_URL = process.env.DATABASE_URL;
|
||||
if (!DATABASE_URL) throw new Error('DATABASE_URL not set');
|
||||
|
||||
const client = postgres(DATABASE_URL);
|
||||
const db = drizzle(client);
|
||||
const db = drizzle(DATABASE_URL);
|
||||
|
||||
const team = pgTable('team', {
|
||||
id: uuid('id').primaryKey(),
|
||||
|
||||
Reference in New Issue
Block a user