Skip to content

Commit

Permalink
Change init output based on new spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Feb 14, 2020
1 parent d19d4c7 commit be57340
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 43 deletions.
36 changes: 8 additions & 28 deletions cli/introspection/src/__tests__/__snapshots__/init.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,10 @@ exports[`is schema and env written on disk replace:
✔ Your Prisma schema was created at prisma/schema.prisma.
You can now open it in your favorite editor.
Next steps
1. Set the DATABASE_URL connection string in the prisma/.env file.
2. Run prisma2 introspect to test the connection and obtain your data model.
3. Run prisma2 generate to generate Prisma Client.
You can then start using Prisma Client in your application:
\`\`\`
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
\`\`\`
NEXT STEPS
1. Modify the DATABASE_URL in the .env file to point to your existing database. If you need to create a new database schema, read https://pris.ly/d/getting-started.
2. Run prisma2 introspect to turn your database schema into a Prisma Data Model.
3. Run prisma2 generate to install Prisma Client and start querying your database.
More information in our documentation:
https://pris.ly/d/getting-started
Expand All @@ -26,20 +16,10 @@ https://pris.ly/d/getting-started
✔ Your Prisma schema was created at prisma/schema.prisma.
You can now open it in your favorite editor.
Next steps
1. Set the DATABASE_URL connection string in the prisma/.env file.
2. Run prisma2 introspect to test the connection and obtain your data model.
3. Run prisma2 generate to generate Prisma Client.
You can then start using Prisma Client in your application:
\`\`\`
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
\`\`\`
NEXT STEPS
1. Modify the DATABASE_URL in the .env file to point to your existing database. If you need to create a new database schema, read https://pris.ly/d/getting-started.
2. Run prisma2 introspect to turn your database schema into a Prisma Data Model.
3. Run prisma2 generate to install Prisma Client and start querying your database.
More information in our documentation:
https://pris.ly/d/getting-started
Expand Down
21 changes: 6 additions & 15 deletions cli/introspection/src/commands/Init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,12 @@ export class Init implements Command {
✔ Your Prisma schema was created at ${chalk.green('prisma/schema.prisma')}.
You can now open it in your favorite editor.
Next steps
1. Set the ${chalk.green('DATABASE_URL')} connection string in the ${chalk.green('prisma/.env')} file.
2. Run ${chalk.green('prisma2 introspect')} to test the connection and obtain your data model.
3. Run ${chalk.green('prisma2 generate')} to generate Prisma Client.
You can then start using Prisma Client in your application:
\`\`\`
${highlightTS(`\
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
`)}
\`\`\`
NEXT STEPS
1. Modify the ${chalk.green('DATABASE_URL')} in the ${chalk.green(
'.env',
)} file to point to your existing database. If you need to create a new database schema, read https://pris.ly/d/getting-started.
2. Run ${chalk.green('prisma2 introspect')} to turn your database schema into a Prisma Data Model.
3. Run ${chalk.green('prisma2 generate')} to install Prisma Client and start querying your database.
More information in our documentation:
${link('https://pris.ly/d/getting-started')}
Expand Down

0 comments on commit be57340

Please sign in to comment.