mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-15 20:08:15 +00:00
feat(app): use instrumentation for migrations
This commit is contained in:
11
src/instrumentation.ts
Normal file
11
src/instrumentation.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const register = async () => {
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
try {
|
||||
console.log('Running database migrations...');
|
||||
await import('./lib/db/migrate');
|
||||
console.log('Database migrations completed successfully');
|
||||
} catch (error) {
|
||||
console.error('Failed to run database migrations:', error);
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user