diff --git a/commands/migration/refresh.ts b/commands/migration/refresh.ts index 4bf45694..171b50f5 100644 --- a/commands/migration/refresh.ts +++ b/commands/migration/refresh.ts @@ -45,6 +45,12 @@ export default class Refresh extends BaseCommand { @flags.boolean({ description: 'Run seeders' }) declare seed: boolean + /** + * Display migrations result in one compact single-line output + */ + @flags.boolean({ description: 'A compact single-line output' }) + declare compactOutput: boolean + /** * Disable advisory locks */ @@ -60,6 +66,10 @@ export default class Refresh extends BaseCommand { args.push('--force') } + if (this.compactOutput) { + args.push('--compact-output') + } + if (this.connection) { args.push(`--connection=${this.connection}`) } diff --git a/commands/migration/reset.ts b/commands/migration/reset.ts index af4af090..f62e5840 100644 --- a/commands/migration/reset.ts +++ b/commands/migration/reset.ts @@ -39,6 +39,12 @@ export default class Reset extends BaseCommand { @flags.boolean({ description: 'Do not run actual queries. Instead view the SQL output' }) declare dryRun: boolean + /** + * Display migrations result in one compact single-line output + */ + @flags.boolean({ description: 'A compact single-line output' }) + declare compactOutput: boolean + /** * Disable advisory locks */ @@ -54,6 +60,10 @@ export default class Reset extends BaseCommand { args.push('--force') } + if (this.compactOutput) { + args.push('--compact-output') + } + if (this.connection) { args.push(`--connection=${this.connection}`) }