mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 06:46:24 +00:00
fix(migration): Improve migration logging
This commit is contained in:
@@ -4,6 +4,7 @@ import getPBInstance from '@/utils/pocketbase'
|
||||
import { cleanupOldMigrations } from '../functions/migration-generation/cleanupOldMigrations'
|
||||
import stageMigration from '../functions/migration-generation/stageMigrations'
|
||||
import { importSchemaModules } from '../utils'
|
||||
import chalk from 'chalk'
|
||||
|
||||
/**
|
||||
* Command handler for generating database migrations
|
||||
@@ -29,9 +30,9 @@ export async function generateMigrationsHandler(
|
||||
|
||||
killPB?.()
|
||||
|
||||
logger.success('Migrations generated successfully')
|
||||
logger.success(`Migrations generated successfully for module ${chalk.green(targetModule ? `${targetModule}` : 'all modules')}`)
|
||||
} catch (error) {
|
||||
logger.error('Migration script failed')
|
||||
logger.error(`Migration script failed for module ${chalk.red(targetModule ? `${targetModule}` : 'all modules')}.`)
|
||||
logger.debug(`Error details: ${error}`)
|
||||
|
||||
killPB?.()
|
||||
|
||||
Reference in New Issue
Block a user