mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 01:01:09 +02:00
Applied formatting to 1487+ files using pnpm format:write - TypeScript/JavaScript files - Svelte components - Astro pages - JSON configs - Markdown docs 13 files still need manual review (Astro JSX comments)
23 lines
502 B
TypeScript
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();
|