Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
fix(cli): re-activate existing db dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Apr 24, 2018
1 parent 29826a5 commit 3dcbf18
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions cli/packages/prisma-cli-core/src/utils/EndpointDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,26 +295,26 @@ export class EndpointDialog {
message: 'Enter database password',
key: 'password',
})
const database = await this.ask({
message: 'Enter database name (only needed when you already have data)',
key: 'database',
})
const alreadyData = await this.ask({
message: 'Do you already have data in the database? (yes/no)',
key: 'alreadyData',
defaultValue: 'no',
validate: value =>
['yes', 'no'].includes(value) ? true : 'Please answer either yes or no',
})
// const database = await this.ask({
// message: 'Enter database name (only needed when you already have data)',
// key: 'database',
// })
// const alreadyData = await this.ask({
// message: 'Do you already have data in the database? (yes/no)',
// key: 'alreadyData',
// defaultValue: 'no',
// validate: value =>
// ['yes', 'no'].includes(value) ? true : 'Please answer either yes or no',
// })

return {
type,
host,
port,
user,
password,
database,
alreadyData,
// database,
alreadyData: false,
}
}

Expand Down Expand Up @@ -379,7 +379,7 @@ export class EndpointDialog {
]
if (fromScratch && !hasDockerComposeYml) {
const fixChoices = [
// ['Use existing database', 'Connect to existing database'],
['Use existing database', 'Connect to existing database'],
['Create new database', 'Set up a local database using Docker'],
]
const rawChoices = [...fixChoices, ...sandboxChoices]
Expand Down Expand Up @@ -419,7 +419,7 @@ export class EndpointDialog {
['local', 'Local Prisma server (connected to MySQL)'],
...clusterChoices,
['Use other server', 'Connect to an existing prisma server'],
// ['Use existing database', 'Connect to existing database'],
['Use existing database', 'Connect to existing database'],
['Create new database', 'Set up a local database using Docker'],
]
const choices = this.convertChoices(rawChoices)
Expand Down

0 comments on commit 3dcbf18

Please sign in to comment.