managarten/packages/cards-database/src/migrate.ts
Till JS 3fa218cbe0 chore(memoro): remove old NestJS backends (Phase 8+9)
Delete apps/memoro/apps/backend/ (NestJS) and apps/memoro/apps/audio-backend/
(NestJS) — all functionality has been ported to the new Hono/Bun servers
(apps/server/ and apps/audio-server/).

Also clean up root and memoro package.json scripts to remove references
to the old @memoro/backend and @memoro/audio-backend packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 11:21:03 +02:00

23 lines
502 B
TypeScript

import { migrate } from 'drizzle-orm/postgres-js/migrator';
import { createClient } from './client.js';
import path from 'path';
async function runMigrations() {
console.log('Running migrations...');
const db = createClient();
try {
await migrate(db, {
migrationsFolder: path.join(__dirname, '../drizzle'),
});
console.log('Migrations completed successfully!');
} catch (error) {
console.error('Migration failed:', error);
process.exit(1);
}
process.exit(0);
}
runMigrations();