This repository was archived by the owner on Apr 15, 2025. It is now read-only.
  
  
  
  
  
Description
Bug description
I have a model with a column of type DateTime    @db.timestamptz(6) as primary key. Microsecond precision is essential in this application. I try to create multiple rows with the same millisecond but different microseconds and Prisma throws a UniqueViolationError.
How to reproduce
TODO: complete MVE
With this model:
model MetadataMarkers {
  metadataID   BigInt
  timestamp     DateTime              @db.Timestamptz(6)
  marker  Json
  @@id([metadataID, timestamp]) 
Expected behavior
All the rows are added successfully.
Environment & setup
- OS: Fedora 37 
 
- Database: Postgresql 
 
- Python version: 3.11.4 
 
- Prisma version:
 
prisma                  : 4.15.0
prisma client python    : 0.9.1
platform                : debian-openssl-1.1.x
expected engine version : 8fbc245156db7124f997f4cecdd8d1219e360944
installed extras        : []
install path            : /microservices/workspace/.venv/lib/python3.11/site-packages/prisma
binary cache dir        : /home/vscode/.cache/prisma-python/binaries/4.15.0/8fbc245156db7124f997f4cecdd8d1219e360944