question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Introspection] Better `introspect` success message

See original GitHub issue

A successful introspect run currently looks like this:

λ npx prisma2@alpha introspect
Introspecting …
Done with introspection in 1.42s
Wrote schema.prisma

We should probably try to make this a bit nicer.

  1. The text itself can be a lot more descriptive (“datamodel was added to your schema.prisma”) and for example offer next steps (“Now use prisma2 generate to create a Prisma Client for your database”).
  2. We could also output some statistics about the datamodel that was added: x models, y relations, z indexes (Actually only the “model” part might be reasonably simple, but maybe this is a good place to go a bit overbord and have fun)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
janpiocommented, May 12, 2020

Then I suggest this iteration:

✔ Introspected 17 models and wrote them into prisma/schema.prisma in 1.36s

It changes the checkmark to a green one as suggested by @sorenbs, adds the number of models as suggested by @do4gr and outputs the actual path of schema.prisma.

If we agree on that I would persist it in https://github.com/prisma/specs/tree/master/cli#introspect so it can be implemented.

2reactions
sorenbscommented, Feb 9, 2020

I would love to have statistics as suggested in 2.

We should also think about how to display failures / guard rails. Something like: 2 models and 7 relations were disabled because we couldn’t support them.

I don’t think we should print “next steps” as suggested in 1. It’s too much clutter.

I think it would be nice to add a green checkmark ala firebase:

image

Whatever we decide, the result should be a pr to the CLI spec.

Read more comments on GitHub >

github_iconTop Results From Across the Web

87 Self-Reflection Questions for Introspection [+Exercises]
Focus on the things that are occurring now that will lead to your future success. You may have negative thoughts pop up, but...
Read more >
16 Self-Reflection Questions To Ask Yourself for Introspection
Introspection is a valuable mental practice to understand yourself and your motivations. Knowing which questions to ask yourself can help ...
Read more >
25 Self-Reflection Quotes to Help You Change & Grow, with ...
You can understand yourself better, and so trust yourself more. Introspection is the opposite of self-rejection. The loving gaze you grant yourself will...
Read more >
The power of introspection for career advancement - MIT Sloan
Another form of introspection that improves our attitude in life is to examine our own spiritual drivers. What is my purpose in life,...
Read more >
Introspection Quotes - Goodreads
“When you see a good person, think of becoming like her/him. When you see someone not so good, reflect on your own weak...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found