From 3dcbf1868063da233f557be0f783dc959599dfa6 Mon Sep 17 00:00:00 2001 From: timsuchanek Date: Tue, 24 Apr 2018 19:58:56 +0200 Subject: [PATCH] fix(cli): re-activate existing db dialog --- .../src/utils/EndpointDialog.ts | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cli/packages/prisma-cli-core/src/utils/EndpointDialog.ts b/cli/packages/prisma-cli-core/src/utils/EndpointDialog.ts index 0f3f65fe16..2f42b1cef7 100644 --- a/cli/packages/prisma-cli-core/src/utils/EndpointDialog.ts +++ b/cli/packages/prisma-cli-core/src/utils/EndpointDialog.ts @@ -295,17 +295,17 @@ 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, @@ -313,8 +313,8 @@ export class EndpointDialog { port, user, password, - database, - alreadyData, + // database, + alreadyData: false, } } @@ -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] @@ -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)