Upgrade linter and formatter to Ultracite (#1224)

This commit is contained in:
Hayden Bleasel 2025-09-20 12:47:10 -07:00 committed by GitHub
parent b1d254283b
commit 0e320b391d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
177 changed files with 6951 additions and 8342 deletions

View file

@ -1,32 +1,32 @@
import { config } from 'dotenv';
import { drizzle } from 'drizzle-orm/postgres-js';
import { migrate } from 'drizzle-orm/postgres-js/migrator';
import postgres from 'postgres';
import { config } from "dotenv";
import { drizzle } from "drizzle-orm/postgres-js";
import { migrate } from "drizzle-orm/postgres-js/migrator";
import postgres from "postgres";
config({
path: '.env.local',
path: ".env.local",
});
const runMigrate = async () => {
if (!process.env.POSTGRES_URL) {
throw new Error('POSTGRES_URL is not defined');
throw new Error("POSTGRES_URL is not defined");
}
const connection = postgres(process.env.POSTGRES_URL, { max: 1 });
const db = drizzle(connection);
console.log('⏳ Running migrations...');
console.log("⏳ Running migrations...");
const start = Date.now();
await migrate(db, { migrationsFolder: './lib/db/migrations' });
await migrate(db, { migrationsFolder: "./lib/db/migrations" });
const end = Date.now();
console.log('✅ Migrations completed in', end - start, 'ms');
console.log("✅ Migrations completed in", end - start, "ms");
process.exit(0);
};
runMigrate().catch((err) => {
console.error('❌ Migration failed');
console.error("❌ Migration failed");
console.error(err);
process.exit(1);
});