Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introspection tells me ⠋ Introspecting MySQL schema with 1 tables. during introspection #794

Closed
janpio opened this issue Oct 20, 2019 · 11 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: introspection topic: prisma db pull CLI: prisma db pull
Milestone

Comments

@janpio
Copy link
Member

janpio commented Oct 20, 2019

... but MySQL doesn't have schemas:

⠋ Introspecting MySQL schema  with 1  tables.

The spacing in the output also seems wonky in general.

(This appears only shortly while the introspection is running, after a connection was successfully made.)

@janpio janpio added the topic: prisma init CLI: prisma init label Oct 20, 2019
@janpio
Copy link
Member Author

janpio commented Oct 20, 2019

For Postgres it says:

⠋ Introspecting PostgreSQL database foo with 1  tables.

🌀

@pantharshit00
Copy link
Contributor

Can you please tell me the exact steps for this? I wasn't able to reproduce when I tried it.

@pantharshit00 pantharshit00 added bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. labels Oct 21, 2019
@janpio
Copy link
Member Author

janpio commented Oct 21, 2019

Internal link https://github.com/prisma/prisma-cli-blackbox-tests/runs/267432579 can tell you the exact steps for Postgres for example: Click Run node init-flow-test.js prisma2 blank_postgres_with_exists_notempty_ts_schema and then scroll down to line 5221 to see it - go back up to see the steps (Blank, Postgres, Enter credentials with DB and Schema of a not empty schema, observe).

@janpio
Copy link
Member Author

janpio commented Dec 22, 2019

Note to myself:
Strings for MySQL and Postgres seem to be switched here:

  • MySQL says schema and can't show one, because MySQL does not have that
  • Postgres says database and shows something, probably the schema

Also additional space after the number in both cases.

@pantharshit00
Copy link
Contributor

Internal link prisma/prisma-cli-blackbox-tests/runs/267432579 can tell you the exact steps for Postgres for example: Click Run node init-flow-test.js prisma2 blank_postgres_with_exists_notempty_ts_schema and then scroll down to line 5221 to see it - go back up to see the steps (Blank, Postgres, Enter credentials with DB and Schema of a not empty schema, observe).

The link is broken now :/

@janpio
Copy link
Member Author

janpio commented Dec 26, 2019

Added you as collaborator.

@pantharshit00
Copy link
Contributor

Ok, I can also reproduce this now:
image

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. labels Dec 26, 2019
@divyenduz
Copy link
Contributor

@janpio @pantharshit00 does this still apply with the new introspection? If no, please close it. Thanks.

@pantharshit00
Copy link
Contributor

Yes, this is still relevant:
image

It is probably a printing issue in the CLI.

@janpio janpio changed the title init, Introspection: tells me ⠋ Introspecting MySQL schema with 1 tables. during introspection Introspection tells me ⠋ Introspecting MySQL schema with 1 tables. during introspection Jan 29, 2020
@janpio janpio added this to the Preview 22 milestone Feb 4, 2020
@janpio
Copy link
Member Author

janpio commented Feb 5, 2020

To recap:

  • Database and schema are mixed up between MySQL and Postgres
  • There was additional spacing after the number of tables sometimes

@Jolg42
Copy link
Member

Jolg42 commented Feb 5, 2020

This is not applicable anymore, the screenshots show the old interactive CLI that was removed.
We do have this https://github.com/prisma/migrate/blob/master/src/utils/ensureDatabaseExists.tsx
It will create a database (the term should be the same for all db here as it's a different scenario, ie: not creating schema/tables) if non existing when doing migrate save down or up.

@Jolg42 Jolg42 closed this as completed Feb 5, 2020
@janpio janpio added topic: prisma db pull CLI: prisma db pull and removed topic: prisma introspect labels Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: introspection topic: prisma db pull CLI: prisma db pull
Projects
None yet
Development

No branches or pull requests

4 participants