Skip to content

Commit a169605

Browse files
committed
lint
1 parent 10d2d5f commit a169605

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

packages/cli/src/commands/pg/upgrade/prepare.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,16 @@ export default class Upgrade extends Command {
3131
const {flags, args} = await this.parse(Upgrade)
3232
const {app, version, confirm} = flags
3333
const {database} = args
34-
let v: string
35-
v = version ?? '16'
34+
const v = version ?? '16'
3635

3736
const db = await getAddon(this.heroku, app, database)
3837
if (legacyEssentialPlan(db))
3938
ux.error(`You can only use ${color.cmd('heroku pg:upgrade:prepare')} on Standard-tier and higher leader databases. For Essential-tier databases, use ${color.cmd('heroku pg:upgrade:run')} instead.`)
40-
39+
4140
const {body: replica} = await this.heroku.get<PgDatabase>(`/client/v11/databases/${db.id}`, {hostname: pgHost()})
42-
if (replica.following)
41+
if (replica.following)
4342
ux.error(`You can only use ${color.cmd('heroku pg:upgrade:prepare')} on Standard-tier and higher leader databases. For follower databases, use ${color.cmd('heroku pg:upgrade:run')} instead.`)
44-
43+
4544
await confirmCommand(app, confirm, heredoc(`
4645
Destructive action
4746
This command prepares the upgrade for ${color.addon(db.name)} to PostgreSQL version ${v} and schedules to upgrade it during the next available maintenance window.

0 commit comments

Comments
 (0)