Skip to content

Native Types: @db.BigInt should be BigInt #4050

@matthewmueller

Description

@matthewmueller

Bug description

When introspecting the bigint type in Postgres, it becomes a type attribute rather than a type.

How to reproduce

create table types (
  optionalBigInt bigint,
  requiredBigInt bigint not null,
  bigIntList bigint[]
);
npx @prisma/cli@dev introspect
model types {
  optionalbigint          Int?       @db.BigInt
  requiredbigint          Int        @db.BigInt
  bigintlist              Int[]      @db.BigInt
}

Expected behavior

model types {
  optionalbigint          BigInt?
  requiredbigint          BigInt
  bigintlist              BigInt[]
}

Environment & setup

Environment variables loaded from ./prisma/.env
@prisma/cli          : 2.10.0-dev.74
@prisma/client       : 2.10.0-dev.58
Current platform     : darwin
Query Engine         : query-engine 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/query-engine-darwin)
Migration Engine     : migration-engine-cli 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/migration-engine-darwin)
Introspection Engine : introspection-core 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/introspection-engine-darwin)
Format Binary        : prisma-fmt 77abecc4840127ebdcc02b83ee1e2c9cc27009f2 (at ../../../../../.npm/_npx/6106/lib/node_modules/@prisma/cli/prisma-fmt-darwin)
Studio               : 0.304.0
Preview Features     : nativeTypes

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions