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

introspect for SQLite returns id as String when it should be Int #1764

Closed
Jolg42 opened this issue Mar 4, 2020 · 1 comment · Fixed by prisma/prisma-engines#553
Closed
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: introspection

Comments

@Jolg42
Copy link
Member

Jolg42 commented Mar 4, 2020

npx prisma2@alpha --version
prisma2@2.0.0-alpha.849, binary version: d309d88661d36f1afd26931b7454c1948fe0a9e4

SqLite from TablePlus
Screen Shot 2020-03-04 at 14 18 14

When doing prisma2 introspect schema output says id is a String instead of Int

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "sqlite"
  url      = "sqlite:./sqlite.db"
}

model teams {
  email String @unique
  id    String @id
  name  String @unique
}

Repro, schema + squlite db
repro-prisma2-sqlite-introspect-id-string.zip

@Jolg42 Jolg42 added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: introspection labels Mar 4, 2020
@Jolg42 Jolg42 added this to the Preview 24 New milestone Mar 4, 2020
@Jolg42
Copy link
Member Author

Jolg42 commented Mar 4, 2020

Found it when trying to query
Screen Shot 2020-03-04 at 14 22 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: introspection
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant