feat: v1 — persistent shell, model gateway, artifact improvements (#1462)
This commit is contained in:
parent
3651670fb9
commit
f9652b452a
161 changed files with 5166 additions and 8009 deletions
|
|
@ -9,25 +9,25 @@ config({
|
|||
|
||||
const runMigrate = async () => {
|
||||
if (!process.env.POSTGRES_URL) {
|
||||
console.log("⏭️ POSTGRES_URL not defined, skipping migrations");
|
||||
console.log("POSTGRES_URL not defined, skipping migrations");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
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" });
|
||||
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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue