prisma: D1: `BigInt` not supported, but doesn't error in `schema.prisma`

Bug description

using the D1 adapter the SQL migration in this blog article swapping out Int for BigInt for ids generates invalid SQL

https://www.prisma.io/blog/build-applications-at-the-edge-with-prisma-orm-and-cloudflare-d1-preview

How to reproduce

Expected behavior

either show an error in prisma.schema or generate proper SQL migration

Prisma information

all info is in blog post

Environment & setup

  • OS: MacOS
  • Database: Sqlite + D1
  • Node.js version: 20.12.2

Prisma Version

5.12.1

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

@Jolg42 I’ve been on vacation, I plan to take a look once I’m back next week.

@Druue I am busy this weekend, but I will setup a D1 project and do a full reproduction (if I can reproduce it) of the issue next weekend.

This only happens when you use BIGINT as datatype.

I also noticed when applying migrations between local / remote I had to individually break each SQL statement into separate files

@janpio when I tried to apply a migration to my D1 instance in production it failed.