Skip to content

Commit

Permalink
feat: add support for --compact-output flag in reset and refresh comm…
Browse files Browse the repository at this point in the history
…ands
  • Loading branch information
thetutlage committed Oct 10, 2024
1 parent edc3d3a commit 89322f9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions commands/migration/refresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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}`)
}
Expand Down
10 changes: 10 additions & 0 deletions commands/migration/reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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}`)
}
Expand Down

0 comments on commit 89322f9

Please sign in to comment.