start ids at an arbitrary number in prisma data model
Asked Answered
A

0

3

Say one has a prisma data model specified like this

// schema.prisma
model Transaction {
id Int @id @default(autoincrement())
// other stuff...
}

What if one wanted to start the ids at some arbitrary number?

After looking at the prisma reference docs, I have not seen a hint on how do this.

Attain answered 1/3, 2021 at 1:34 Comment(1)
From my research, it does not seem that prisma supports that althout apparently at least postgresql does : https://mcmap.net/q/1021616/-autoincrement-start-at-xExpect

© 2022 - 2024 — McMap. All rights reserved.