motiondev
03/09/2022, 10:03 AMmodel Denomination {
id BigInt @unique @default(autoincrement()) @db.BigInt
symbol String @unique
active Boolean
createdAt DateTime @default(now()) @map("created_at") @db.Timestamp(5)
updatedAt DateTime @default(now()) @map("updated_at") @db.Timestamp(5)
@@map("denomination")
}
Running prisma migrate, generates the following sql scrcipt
-- CreateTable
CREATE TABLE "denomination" (
"id" BIGSERIAL NOT NULL, -- Here I want BIGINT insted of BIGSERIAL
"symbol" TEXT NOT NULL,
"active" BOOLEAN NOT NULL,
"created_at" TIMESTAMP(5) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(5) NOT NULL DEFAULT CURRENT_TIMESTAMP
);
Thanks in advance!janpio
SERIAL
or its equivalents is baked in right now.janpio
janpio
motiondev
03/10/2022, 12:12 PMBIGINT
for security reasons. Also found this issue on GitHub, I will change it by hand for now, but it would be great to have a customizable feature for this type of issue.janpio
janpio
BIGINT
, how would the sequence be defined then for the field which you request via @default(autoincrement())
?