new things
All checks were successful
Recommender Build and Deploy (internal) / Build Recommender Image (push) Successful in 4m4s
Recommender Build and Deploy (internal) / Deploy Recommender (internal) (push) Successful in 11s

This commit is contained in:
2026-04-02 19:24:58 -03:00
parent 91870f4046
commit ba38092784
19 changed files with 695 additions and 130 deletions

View File

@@ -4,6 +4,7 @@ import postgres from 'postgres';
import * as dotenv from 'dotenv';
import path from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs/promises';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -25,6 +26,10 @@ const runMigrations = async () => {
console.log('Running database migrations...');
try {
const folder = path.join(__dirname, '../drizzle');
// print all migrations
const migrations = await fs.readdir(folder);
console.log('Migrations:', JSON.stringify(migrations));
await migrate(db, { migrationsFolder: folder });
console.log('Migrations completed successfully.');
} catch (err) {