support postgresql as database option

This commit is contained in:
miloschwartz
2025-06-04 12:02:07 -04:00
parent 62a0104e70
commit 2cca561e51
218 changed files with 1417 additions and 713 deletions

View File

@@ -0,0 +1,20 @@
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
import db from "./driver";
import path from "path";
const migrationsFolder = path.join("server/migrations");
const runMigrations = async () => {
console.log("Running migrations...");
try {
migrate(db as any, {
migrationsFolder: migrationsFolder,
});
console.log("Migrations completed successfully.");
} catch (error) {
console.error("Error running migrations:", error);
process.exit(1);
}
};
runMigrations();